mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
rename class Lock to struct NIOLock (#2266)
This commit is contained in:
1 parent
0080954998
commit
4ed8e1e228
24 files changed
+223
-68
No files matched your search
@@ -353,12 +353,12 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable {
|
||||
///
|
||||
/// We use this to keep track of where promises come from in the `NIOAsyncTestingEventLoop`.
|
||||
private class PromiseCreationStore {
|
||||
private let lock = Lock()
|
||||
private let lock = NIOLock()
|
||||
private var promiseCreationStore: [_NIOEventLoopFutureIdentifier: (file: StaticString, line: UInt)] = [:]
|
||||
|
||||
func promiseCreated(futureIdentifier: _NIOEventLoopFutureIdentifier, file: StaticString, line: UInt) {
|
||||
precondition(_isDebugAssertConfiguration())
|
||||
self.lock.withLockVoid {
|
||||
self.lock.withLock { () -> Void in
|
||||
self.promiseCreationStore[futureIdentifier] = (file: file, line: line)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user