Skip to content

Commit 175a92d

Browse files
committed
add Sendable conformance to NSLock
1 parent 77af9c5 commit 175a92d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Foundation/NSLock.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ private typealias _RecursiveMutexPointer = UnsafeMutablePointer<pthread_mutex_t>
4949
private typealias _ConditionVariablePointer = UnsafeMutablePointer<pthread_cond_t>
5050
#endif
5151

52-
open class NSLock: NSObject, NSLocking {
52+
// fix for: https://github.com/apple/swift-corelibs-foundation/issues/4941
53+
open class NSLock: NSObject, NSLocking, Sendable {
5354
internal var mutex = _MutexPointer.allocate(capacity: 1)
5455
#if os(macOS) || os(iOS) || os(Windows)
5556
private var timeoutCond = _ConditionVariablePointer.allocate(capacity: 1)

0 commit comments

Comments
 (0)