Skip to content

Commit 1a887c2

Browse files
committed
appkit: mark makeCoordinator with MainActor.
* The appropriate method that should NOT have a main actor is determineViewSize, since that will break compiling with swift 6 strict concurrency. Signed-off-by: furby™ <[email protected]>
1 parent f4cf5ef commit 1a887c2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/AppKitBackend/NSViewRepresentable.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public protocol NSViewRepresentable: View where Content == Never {
2727
///
2828
/// The coordinator is used when the view needs to communicate changes to the rest of
2929
/// the view hierarchy (i.e. through bindings), and is often the view's delegate.
30+
@MainActor
3031
func makeCoordinator() -> Coordinator
3132

3233
/// Compute the view's size.

0 commit comments

Comments
 (0)