diff --git a/stdlib/public/Synchronization/Mutex/LinuxImpl.swift b/stdlib/public/Synchronization/Mutex/LinuxImpl.swift index d2d5f74edc3c9..07d0e2cccd842 100644 --- a/stdlib/public/Synchronization/Mutex/LinuxImpl.swift +++ b/stdlib/public/Synchronization/Mutex/LinuxImpl.swift @@ -235,8 +235,7 @@ extension _MutexHandle { // EDEADLK - "The futex word at uaddr is already locked by the caller." case 35: - // TODO: Replace with a colder function / one that takes a StaticString - fatalError("Attempt to try to lock Mutex in already acquired thread") + return false // This handles all of the following errors which generally aren't // applicable to this implementation: diff --git a/stdlib/public/Synchronization/Mutex/Mutex.swift b/stdlib/public/Synchronization/Mutex/Mutex.swift index a3b0d0eb1feb8..bc7dc2a5a14e9 100644 --- a/stdlib/public/Synchronization/Mutex/Mutex.swift +++ b/stdlib/public/Synchronization/Mutex/Mutex.swift @@ -114,12 +114,6 @@ extension Mutex where Value: ~Copyable { /// } /// return try body(&value) /// - /// - Warning: Recursive calls to `withLockIfAvailable` within the - /// closure parameter has behavior that is platform dependent. - /// Some platforms may choose to panic the process, deadlock, - /// or leave this behavior unspecified. This will never - /// reacquire the lock however. - /// /// - Parameter body: A closure with a parameter of `Value` /// that has exclusive access to the value being stored within /// this mutex. This closure is considered the critical section