Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: address concurrency warning on onPreferenceChange #389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cweider
Copy link

@cweider cweider commented Feb 12, 2025

In the SDKs released with Xcode 16.2, Apple marked this closure @Sendable, but not @MainActor. It's not clear if this is intentional or if it may be revised later. The official recommendation appears to be capturing the Binding and writing to it (Binding is asserted to be Sendable).
https://stackoverflow.com/questions/79209071/xcode-16-2-beta-2-renders-onpreferencechange-unusable

In the SDKs released with Xcode 16.2, Apple marked this closure
`@Sendable`, but *not* `@MainActor`. It's not clear if this is
intentional or if it may be revised later. The official
recommendation appears to be capturing the `Binding` and writing
to it (`Binding` is asserted to be `Sendable`).
https://stackoverflow.com/questions/79209071/xcode-16-2-beta-2-renders-onpreferencechange-unusable
@cweider cweider force-pushed the concurrency-on-preference-key branch from 94cc7b7 to 972fe63 Compare February 12, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant