Skip to main content

Module mutex

Module mutex 

Source
Expand description

Lock helpers.

Functionsยง

lock ๐Ÿ”’
Lock a mutex, also if a panic poisoned it. A panic aborts release builds, so this only matters for tests and debug builds. Treating a poisoned lock like an empty one there would hide the state behind it, like the children which are waited for.
read ๐Ÿ”’
Lock a read write lock for reading, also if a panic poisoned it, see lock.
write ๐Ÿ”’
Lock a read write lock for writing, also if a panic poisoned it, see lock.