Module locks

This module contains Nim's support for locks and condition vars.Low level system locks and condition vars.

Types

TLock = TSysLock
Nim lock; whether this is re-entrant or not is unspecified!   Source
TCond = TSysCond
Nim condition variable   Source
LockEffect = object of RootEffect
effect that denotes that some lock operation is performed. Deprecated, do not use anymore!   Source
AquireEffect = object of LockEffect
effect that denotes that some lock is acquired. Deprecated, do not use anymore!   Source
ReleaseEffect = object of LockEffect
effect that denotes that some lock is released. Deprecated, do not use anymore!   Source

Procs

proc initLock(lock: var TLock) {.inline, raises: [], tags: [].}
Initializes the given lock.   Source
proc deinitLock(lock: var TLock) {.inline, raises: [], tags: [].}
Frees the resources associated with the lock.   Source
proc tryAcquire(lock: var TLock): bool {.raises: [], tags: [].}
Tries to acquire the given lock. Returns true on success.   Source
proc acquire(lock: var TLock) {.raises: [], tags: [].}
Acquires the given lock.   Source
proc release(lock: var TLock) {.raises: [], tags: [].}
Releases the given lock.   Source
proc initCond(cond: var TCond) {.inline, raises: [], tags: [].}
Initializes the given condition variable.   Source
proc deinitCond(cond: var TCond) {.inline, raises: [], tags: [].}
Frees the resources associated with the lock.   Source
proc wait(cond: var TCond; lock: var TLock) {.inline, raises: [], tags: [].}
waits on the condition variable cond.   Source
proc signal(cond: var TCond) {.inline, raises: [], tags: [].}
sends a signal to the condition variable cond.   Source