read(_:)
Provides thread-safe scoped access to protected value
func read<V>(_ body: (T) throws -> V) rethrows -> V
Parameters
- body
The closure to be called for scoped access
Returns
The return value of the closure
Provides thread-safe scoped access to protected value
func read<V>(_ body: (T) throws -> V) rethrows -> V
The closure to be called for scoped access
The return value of the closure