Module Fiber.E

Existential fibers.

type t

The type for existential fibers.

val id : t -> id

id f is the unique identifier of f.

val equal : t -> t -> bool

equal f0 f1 is true if f0 and f1 are the same fibers.

val compare : t -> t -> int

compare f0 f1 is a total order on fibers compatible with equal.

val attach : t -> spawn:t -> unit

attach p ~spawn makes spawn a spawn of p.

val active_spawns : t -> t list

active_spawns f are the possibly non-terminated spawns of f.

val set_aborting : t -> unit

set_aborting f sets the state of f to aborting, unless already terminated.

val state : t -> [ `Running | `Aborting | `Terminated ]

state f is the state of f.