package xapi-stdext-threads
Module Xapi_stdext_threads.SemaphoreSource
create n create a semaphore with initial value n (a positive integer). Raise Invalid_argument if n <= 0
acquire k s block until the semaphore value is >= k (a positive integer), then atomically decrement the semaphore value by k. Raise Invalid_argument if k <= 0
release k s atomically increment the semaphore value by k (a positive integer). Raise Invalid_argument if k <= 0