package luv

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Luv.SemaphoreSource

Semaphores.

See Semaphores in libuv.

Sourcetype t

Binds uv_sem_t.

Sourceval init : int -> (t, Error.t) Result.result

Allocates and initializes a semaphore.

Binds uv_sem_init. See sem_init(3p).

Sourceval destroy : t -> unit

Cleans up a semaphore.

Binds uv_sem_destroy. See sem_destroy(3p).

Sourceval post : t -> unit

Increments a semaphore.

Binds uv_sem_post. See sem_post(3p).

Sourceval wait : t -> unit

Decrements a semaphore.

Binds uv_sem_wait. See sem_wait(3p).

Sourceval trywait : t -> (unit, Error.t) Result.result

Tries to decrement a semaphore without blocking.

Binds uv_sem_trywait. See sem_trywait(3p).

OCaml

Innovation. Community. Security.