Module Nanoev_posix

Nano event loop using Poll/Ppoll

include module type of struct include Nanoev end
type t = Nanoev.t
exception Closed
module Impl = Nanoev.Impl
val clear : t -> unit

Reset the state

val wakeup_from_outside : t -> unit
val step : t -> unit

Run one step of the event loop until something happens

val close : t -> Unix.file_descr -> unit

Close the file descriptor and clean it up

val max_fds : t -> int

Maximum number of file descriptors that can be observed at once.

val on_readable : t -> Unix.file_descr -> 'a -> 'b -> (closed:bool -> 'a -> 'b -> unit) -> unit
val on_writable : t -> Unix.file_descr -> 'a -> 'b -> (closed:bool -> 'a -> 'b -> unit) -> unit
val run_after_s : t -> float -> 'a -> 'b -> ('a -> 'b -> unit) -> unit
val create : unit -> t

Create a new nanoev loop using Iomux (poll/ppoll).