read(_:)

Provides thread-safe scoped access to protected value

Protected.swift:21
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