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/System_event/index.html

Module Sel_core.System_eventSource

Extension point for system events, for example input on a file descriptor. The sel library uses it to implement the Unix specific events.

type file_descr = Sel_core__fd.t = ..

What a system event waits for, e.g. a Unix file descriptor to be readable: the implementations of sel extend it with their own

type ('a, 'b) step =
  1. | Yes of 'a
    (*

    the event is ready, with this value

    *)
  2. | No of 'b
    (*

    the event is not ready

    *)
  3. | Advanced of 'b
    (*

    the event progressed but it is not ready yet

    *)
type 'a t = {
  1. fd : file_descr option;
  2. advance : unit -> ('a, 'a t) step;
  3. descr : string;
}

A system event. advance is called if fd is None (the event is polled) or if fd is reported as ready by the backend.

Sourceval event : ?priority:int -> ?name:string -> 'a t -> 'a Event.t