Effect.throttle requires Stride to be Sendable, but DispatchQueue.SchedulerTimeType.Stride is not Sendable
#3813
JoeSzymanskiNoom
started this conversation in
General
Replies: 1 comment 1 reply
-
|
Hi @JoeSzymanskiNoom, considering Combine was created before Swift's concurrency tools and hasn't had any major updates since its inception, the only thing you can do is Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
This issue was raised when
Effect.throttlewas updated for Sendability issues: https://github.com/pointfreeco/swift-composable-architecture/pull/3325/files/1ae7e67def1deb8650d79d3bda41f8165243ca7b#r1993347017From what I can tell, the throttle function requires the
Strideto beSendable, but the most common instances ofStrideare notSendable, so the only way to use the function is to disable the warning/error via@preconcurrency.Is this an oversight in the implementation? Or is there another form of
Stridethat is expected to be used here? I haven't been able to find any documentation that would indicate one way or the other.Checklist
mainbranch of this package.Expected behavior
Effect.throttlecan be used with StrictConcurrency enabledActual behavior
Effect.throttleraises StrictConcurrency warnings/errors becauseType 'DispatchQueue.SchedulerTimeType.Stride' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language modeReproducing project
No response
The Composable Architecture version information
1.23.1
Destination operating system
No response
Xcode version information
Xcode 16.4
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions