Module type Fut_backend_base.Backend

Fut backend interface.

Note. While the Unix module interface is needed to compile backends, there's no need to link against it.

Runtime

val name : string
val start : unit -> unit
val stop : unit -> unit
val step : timeout:float -> float

timeout is guaranteed to be equal or greater than 0., if it is equal to max_float, means unbounded wait.

Actions

val action : (unit -> unit) -> unit

Signal actions

val signal_action : int -> (abort -> (int -> unit) * 'a) -> 'a

See Fut.Runtime.signal_action.

Timer actions

val timer_action : float -> (abort -> (float -> unit) * 'a) -> 'a

See Fut.Runtime.timer_action.

File descriptor actions

val fd_action : [ `R | `W ] -> Unix.file_descr -> (bool -> unit) -> unit
val fd_close : Unix.file_descr -> unit

Workers

val worker_count : unit -> int

See Fut.Runtime.worker_count.

val set_worker_count : int -> unit

See Fut.Runtime.set_worker_count.

Queues

module Queue : sig ... end