FileLock
The state of a scoped File lock.
Passed to the block given to File.lock and
File.try_lock.
Fields
held @ BoolWhether the lock is currently held.
The value is false when
try_lockdoes not acquire the lock, and after releasing it.
Methods
release()
Releases the lock before the surrounding scope exits.
Repeated calls have no effect. Release runs with interruption masked.