Lock to protect very short critical sections.
final class Spinlock
s25PackageConcurrencyHelpers8SpinlockC
T06Q
import PackageConcurrencyHelpers
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
protocol Lockable
Protocol any lock can implement.
protocol Sendable
init()
Create a new spin-lock.
func lock()
Acquire the lock.
func unlock()
Release the lock.
func withLock<T>(_ body: () throws -> T) rethrows -> T
Acquire the lock for the duration of the given block.
func withLockVoid(_ body: () throws -> Void) rethrows