Instance Propertyswift-nio 2.72.0NIOConcurrencyHelpers
unsafe
Provides an unsafe view over the lock and its value.
NIOLockedValueBox.swift:46var unsafe: Unsafe { get }
This can be beneficial when you require fine grained control over the lock in some situations but don’t want lose the benefits of withLockedValue(_:)
in others by switching to NIOLock
.
Other members in extension
Types
struct Unsafe
Provides an unsafe view over the lock and its value.
Type members
init(Value
) Initialize the
Value
.
Instance members
func withLockedValue<T>((inout Value) throws -> T
) rethrows -> T Access the
Value
, allowing mutation of it.