Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions stdlib/public/Synchronization/Mutex/LinuxImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions stdlib/public/Synchronization/Mutex/Mutex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down