From f963828ad748a9ede034bdd807b0fcd0d3827696 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 14 Oct 2023 00:06:32 +0200 Subject: [PATCH] Document that Apple handles are main thread only --- src/appkit.rs | 3 +++ src/uikit.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/appkit.rs b/src/appkit.rs index 3b05810..cad1f2a 100644 --- a/src/appkit.rs +++ b/src/appkit.rs @@ -22,6 +22,9 @@ impl AppKitDisplayHandle { } /// Raw window handle for AppKit. +/// +/// Note that this struct is `!Send` and `!Sync`, so any valid instance of +/// this must only exist on the main thread. #[non_exhaustive] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct AppKitWindowHandle { diff --git a/src/uikit.rs b/src/uikit.rs index 1f4895e..fe48758 100644 --- a/src/uikit.rs +++ b/src/uikit.rs @@ -22,6 +22,9 @@ impl UiKitDisplayHandle { } /// Raw window handle for UIKit. +/// +/// Note that this struct is `!Send` and `!Sync`, so any valid instance of +/// this must only exist on the main thread. #[non_exhaustive] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct UiKitWindowHandle {