semaphores

  Source   Edit

Types

Semaphore = object
  id: int
  lock: Lock
  count: int
  cond: Cond
  Source   Edit

Procs

proc id(s: Semaphore): int {....raises: [], tags: [].}
  Source   Edit
proc hash(s: Semaphore): Hash {....raises: [], tags: [].}
helper for use in containers   Source   Edit
proc `==`(a, b: Semaphore): bool {....raises: [], tags: [].}
helper for use in containers   Source   Edit
proc `<`(a, b: Semaphore): bool {....raises: [], tags: [].}
helper for use in containers   Source   Edit
proc init(s: var Semaphore; id: int) {....raises: [], tags: [].}
initialize a semaphore   Source   Edit
proc `=destroy`(s: var Semaphore) {....raises: [], tags: [].}
destroy a semaphore   Source   Edit
proc signal(s: var Semaphore) {....raises: [], tags: [].}
blocking signal of s   Source   Edit
proc wait(s: var Semaphore) {....raises: [], tags: [].}
blocking wait on s   Source   Edit
proc isReady(s: var Semaphore): bool {....raises: [], tags: [].}
true if s is ready   Source   Edit

Templates

template withReady(s: var Semaphore; body: untyped): untyped
run the body with a ready s   Source   Edit