swift
2ebb425e - [SE-0512] Adjust the docs for `Mutex.withLockIfAvailable()` re: spurious failures. (#85497)

Commit
7 days ago
[SE-0512] Adjust the docs for `Mutex.withLockIfAvailable()` re: spurious failures. (#85497) This PR adjusts the documentation for `Mutex.withLockIfAvailable()` to clarify that it is not subject to spurious failures. The C11 and C++11 specs for their respective `tryLock()` APIs allow for spurious failures, but our implementations and those of every other similar API I've found don't use weak `cmpxchg`s and don't spuriously fail. Implements [SE-0512](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0512-withlockifavailable-cannot-spuriously-fail.md).
Author
Parents
Loading