Renames UnfairLock to TSMutex and refreshes its interface to remove methods that are unused except in tests. TSMutex has a generic parameter State that supports non-sendable and non-copyable values. UnfairLock is a type alias of TSMutex<Void>. The withLock() function is also no longer inherited from NSLocking, instead being implemented to be similar to OSAllocatedUnfairLock's API. Finally, the class is audited for sendability and compiles without warnings under strict concurrency checking. |
||
|---|---|---|
| .. | ||
| TSMutex.swift | ||