-
Notifications
You must be signed in to change notification settings - Fork 52
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
The constructs provided by this package need to be marked Sendable
#45
Comments
The big question that needs to be answered is this: do we need to restrict For example, class SomeClass: AtomicReference {
var array: [Int] = []
}
let v: ManagedAtomic<SomeClass> = ...
let instance = v.load(ordering: .sequentiallyConsistent) // OK
instance.array.append(42) // data race |
Putting this back on 1.0.2 -- we'll need to decide whether this can technically go in a patch release, but I think we'll want to release this together with #41 in any case. We may just need to rename the milestone to 1.1.0. |
This is more urgent than I expected, as |
Filed #47 to track the Fixing the |
The new Swift Concurrency Checking warnings in Xcode 14 (in Targeted mode) told me that my |
When trying to adopt Since we cannot drop 5.5 at the time, it’s better to add the conformance in |
Swift 5.5 introduces
Sendable
, which puts new constraints on transferring values across concurrency domains.The constructs provided by this package are designed to be safe to use without synchronization, so they should be marked
Sendable
. (Hopefully people aren't passing around nakedManagedAtomic
values, but in case they do, the compiler should know that this is safe.)Information
Checklist
main
branch of this package.The text was updated successfully, but these errors were encountered: