-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Mark Operator Closures as @Sendable #2639
base: main
Are you sure you want to change the base?
Conversation
…ethods are all called on the same thread.
…introduced warnings
# Conflicts: # RxSwift/Schedulers/VirtualTimeScheduler.swift
Added PR #2610 here |
@freak4pc Hi! Just checking in to see if there’s any chance this PR could be reviewed. Getting this merged is essential for updating my project to Swift 6, and I imagine others may be in a similar situation. I’m eager to get feedback or make any adjustments needed to move it forward. Thanks so much for your time! |
Hey @AndreiArdelean1 - |
# Conflicts: # RxSwift/Schedulers/VirtualTimeScheduler.swift
Mark Operator Closures as @sendable to Prevent Crashes in Swift 6 Isolated Contexts #2638
In Swift 6, closures created in an isolated context automatically inherit the isolation of that context, unless they are marked as @sendable. Because of this, creating an operation like map, flatMap, distinctUntilChanged, etc. from an isolated context, but calling it from a different thread, causes the call to crash.