Procs
proc `=destroy`(s: var Semaphore) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc initSemaphore(s: var Semaphore; count: int = 0) {....raises: [], tags: [], forbids: [].}
- make a semaphore available for use Source Edit
Templates
template withSemaphore(s: var Semaphore; logic: typed): untyped
- wait for the semaphore s, run the logic, and signal it Source Edit