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

Mark Operator Closures as @Sendable #2639

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

AndreiArdelean1
Copy link

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.

# Conflicts:
#	RxSwift/Schedulers/VirtualTimeScheduler.swift
@AndreiArdelean1
Copy link
Author

Added PR #2610 here

@AndreiArdelean1
Copy link
Author

@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!

@freak4pc
Copy link
Member

freak4pc commented Nov 7, 2024

Hey @AndreiArdelean1 -
It's a very large change. Something that could speed up the mergeability of it is to reduce risk -
If you are willing to cut a release of your own app that targets this branch and confirm there are no production-related issues (crashes, misbehaviors) it would make it much simpler, since it will then only be a code review, and not a functionality review which would be very problematic to do without real-world tests on this.

Andrei Ardelean added 2 commits November 21, 2024 09:27
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.

4 participants