Semaphore.BinaryA binary semaphore.
val make : ?padded:bool -> bool -> tmake initial creates a new binary semaphore with count of 1 in case initial is true and count of 0 otherwise.
val release : t -> unitrelease semaphore sets the count of the semaphore to 1.
âšī¸ This operation is not cancelable.
val acquire : t -> unitacquire semaphore waits until the count of the semaphore is 1 and then atomically changes the count to 0.
val try_acquire : t -> booltry_acquire semaphore attempts to atomically change the count of the semaphore from 1 to 0.