Function unlock [src]

Releases a held exclusive lock. Asserts the lock is held exclusively.

Prototype

pub fn unlock(rwl: *SingleThreadedRwLock) void

Parameters

rwl: *SingleThreadedRwLock

Source

pub fn unlock(rwl: *SingleThreadedRwLock) void { assert(rwl.state == .locked_exclusive); assert(rwl.shared_count == 0); // corrupted state detected rwl.state = .unlocked; }