package miou

  1. Overview
  2. Docs
Composable concurrency primitives for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

miou-0.10.0.tbz
sha256=bf1954c6f66ac9d306b3b4f948b19f59d2c327213af930e19d9fbc73f134fa18
sha512=cea8136bf9fef32898c962b4136fd784a20fc8a6626cd19bb7d0a37e798aa7a7f06ea9f19b47f6e03bb1afd477cf46e57d4c6a376601eb282c4fb07d490ca727

doc/miou.unix/Miou_epoll/index.html

Module Miou_epollSource

A direct binding of epoll(7).

Sourcetype t

An epoll instance.

Sourcemodule Flags : sig ... end
Sourceval invalid_fd : t
Sourceval create : unit -> t
Sourceval close : t -> unit
Sourceval add : t -> Unix.file_descr -> Flags.t -> int

add t fd flags registers fd. Returns 0 on success, otherwise the errno (registering a descriptor that is already there gives EEXIST).

Sourceval upd : t -> Unix.file_descr -> Flags.t -> int

upd t fd flags changes (or re-arms) the events watched for fd. Returns 0 on success, otherwise the errno (typically ENOENT if fd was closed in the meantime, which drops it from the set automatically).

Sourceval del : t -> Unix.file_descr -> int

del t fd stops watching fd.

Sourcetype events

A buffer holding the descriptors reported ready by the last wait.

Sourceval events : int -> events
Sourcetype epoll_timeout =
  1. | Infinite
  2. | No_wait
  3. | Nanoseconds of int64
Sourceval wait : t -> events -> epoll_timeout -> int

wait t events timeout fills events and returns how many descriptors are ready. An interruption by a signal returns 0.

Sourceval iter : events -> int -> (Unix.file_descr -> Flags.t -> unit) -> unit

iter events n fn applies fn to the n descriptors reported ready.