package index
package index
-
index
-
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Binary semaphores for mutual exclusion
val make : bool -> t
make b
returns a new semaphore with the given initial state. If b
is true
, the semaphore is initially available for acquisition; otherwise, the semaphore is initially unavailable.
val acquire : string -> t -> unit
Acquire the given semaphore. Acquisition is not re-entrant.
val release : t -> unit
Release the given semaphore. If any threads are attempting to acquire the semaphore, exactly one of them will gain access to the semaphore.
val with_acquire : string -> t -> (unit -> 'a) -> 'a
with_acquire t f
first obtains t
, then computes f ()
, and finally release t
.
val is_held : t -> bool
is_held t
returns true
if the semaphore is held, without acquiring t
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>