package sel

  1. Overview
  2. Docs

Module Sel_core.On

Events one can wait for (read data, pull from queues, ...)

  • name for debug printing
  • priority lower integers correspond to high priorities (as in Unix nice), default is 0
type 'a res = ('a, exn) result
val queues : ?priority:int -> ?name:string -> 'b Queue.t -> 'c Queue.t -> ('b -> 'c -> 'a) -> 'a Event.t

Synchronization events between two components (e.g. a worker pool and a task queue) and an event (e.g. starting a worker)

val queue : ?priority:int -> ?name:string -> 'b Queue.t -> ('b -> 'a) -> 'a Event.t

Synchronization events between a component and an event

val queue_all : ?priority:int -> ?name:string -> 'b Queue.t -> ('b -> 'b list -> 'a) -> 'a Event.t

Synchronization events between a component and an event. The queue is emptied, useful to process the contents in batches

val promise : ?priority:int -> ?name:string -> 'b Promise.t -> ('b Promise.state -> 'a) -> 'a Event.t