Skip to content

Correctly back-port Synchronization.Mutex #15

Open
@jakepetroules

Description

@jakepetroules

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions