-
Notifications
You must be signed in to change notification settings - Fork 469
DispatchTimeInterval
is not Sendable
#787
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
Comments
I expected it to be marked `Sendable` in the next version of Swift, but it still hasn't so I filed https://github.com/apple/swift/issues/65044. `DispatchTimeInterval` is a value type, so it's safe to do this. I don't want to remove the `#if swift` version check because I expect it to be marked `Sendable` in a future version.
Hi there, thanks for reporting, that's definitely something to be addressed. Generally dispatch is not governed "by Swift" so this isn't the right place to report but I'll reach out and see what we can do. At the same time, we'll need to do the change for corelibs dispatch for non apple platforms over here: https://github.com/apple/swift-corelibs-libdispatch/blob/main/src/swift/Time.swift |
Actually, maybe best to move this issue to corelibs-dispatch, allow me to do that. |
Tagging @PriyaAvhad who has looked into this |
This is an `enum` with associated values of `Int` type that are all `Sendable`, so should be safe mark the whole `enum` as such. Resolves #787.
This is an `enum` with associated values of `Int` type that are all `Sendable`, so should be safe mark the whole `enum` as such. This change is low to no risk for 5.9 as it's additive and doesn't touch any other types or functions. Resolves #787.
This has been merged to main and 5.9 👍 |
Description
For example:
Is there a reason why
DispatchTimeInterval
shouldn't be marked asSendable
? It's an immutable value type.Environment
The text was updated successfully, but these errors were encountered: