rename class Lock to struct NIOLock (#2266)

This commit is contained in:
Johannes Weiss authored and GitHub committed 2022-09-21 07:36:42 -07:00
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)
}
}