Static Methodswift-metrics 2.6.1CoreMetrics
withWriterLock(_:)
Acquire a writer lock for the duration of the given block.
static func withWriterLock<T>(_ body: () throws -> T) rethrows -> T
Parameters
- body
The block to execute while holding the lock.
Returns
The value returned by the block.