This module contains Nim's support for locks and condition vars.
Lock = SysLock
Cond = SysCond
proc initLock(lock: var Lock) {.inline, raises: [], tags: [].}
proc deinitLock(lock: var Lock) {.inline, raises: [], tags: [].}
proc tryAcquire(lock: var Lock): bool {.raises: [], tags: [].}
proc acquire(lock: var Lock) {.raises: [], tags: [].}
proc release(lock: var Lock) {.raises: [], tags: [].}
proc initCond(cond: var Cond) {.inline, raises: [], tags: [].}
proc deinitCond(cond: var Cond) {.inline, raises: [], tags: [].}
proc wait(cond: var Cond; lock: var Lock) {.inline, raises: [], tags: [].}
proc signal(cond: var Cond) {.inline, raises: [], tags: [].}
template withLock(a: Lock; body: untyped)
© 2006–2017 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/locks.html