fuseau
Fuseau.Event
Atomic events.
An atomic event is something that can occur, or not occur, without in-between.
fuseau.unix
type 'a t = {
poll : unit -> 'a Exn_bt.result option;
wait : (unit -> unit) -> Cancel_handle.t;
}
An event yielding 'a
'a
type 'ret branch =
| When : 'a t * ('a -> 'ret) -> 'ret branch
Used for select
select
val select : 'ret branch list -> 'ret
Select between multiple events. The first one to be ready wins, and the corresponding function is called.
If no event is ready, the fiber suspends, and the wait function of each event is used to wake it up again.
wait