Instance Methodswift-nio 2.72.0NIOConcurrencyHelpers
lock
Acquire the lock.
lock.swift:76This declaration has been renamed to NIOLock.
This declaration is deprecated.
func lock()
Whenever possible, consider using withLock
instead of this method and unlock
, to simplify lock handling.
Other members in extension
Type members
Show obsolete interfaces (1)
Hide obsolete interfaces
init(
) Create a new lock.
Instance members
Show obsolete interfaces (3)
Hide obsolete interfaces
func unlock(
) Release the lock.
func withLock<T>(() throws -> T
) rethrows -> T Acquire the lock for the duration of the given block.
func withLockVoid(() throws -> Void
) rethrows