package sel

All checked builds pass
  1. Overview
  2. Docs
Simple Event Library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

sel-0.10.0.tbz
sha256=9151431abaec30aeb93a4f5618587516023f9945ade84555d6e96cc517616cda
sha512=4d2401609602da9f08cfdab75ae4bc97205e44b7284ef979f3a7ba9acf9d378ada40fe6fd4f4a4a09457ea43cd3aa7a33eea601cf9fa914b4a99a3a52989dadd

doc/sel.core/Sel_core/On/index.html

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