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

Correctly back-port Synchronization.Mutex #15

Open
jakepetroules opened this issue Jan 30, 2025 · 0 comments
Open

Correctly back-port Synchronization.Mutex #15

jakepetroules opened this issue Jan 30, 2025 · 0 comments

Comments

@jakepetroules
Copy link
Collaborator

The code currently poly-fills Synchronization.Mutex on Apple platforms, as we need to deploy to platforms older than macOS 15. (see Sources/SWBUtil/Lock.swift)

This poly-fill is however not implemented correctly (it's a class, not a struct), which causes a couple of Swift 6 errors to be emitted.

I looked at doing this earlier by copying https://github.com/swiftlang/swift/blob/main/stdlib/public/Synchronization/Mutex/Mutex.swift, but there's a lot of underscored attributes used in the implementation like @_alwaysEmitIntoClient, @_staticExclusiveOnly, etc. I don't know what all of these mean or which ones would be appropriate in a poly-fill version of the implementation.

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

No branches or pull requests

1 participant