package kqueue

  1. Overview
  2. Docs
OCaml bindings for kqueue event notification interface

Install

Dune Dependency

Authors

Maintainers

Sources

kqueue-0.2.0.tbz
sha256=6f2fff9c0996c49377a552ae7b4bc573e5a80ec6a16855d18987b738e15eecd1
sha512=89052481b225648f90f5cee77f1462c3d86c5d951c8aeaf16004e2390684477c5b572664399ae97476eff3c86448a6ccfb339159f38dc58a378df87fca23df53

doc/kqueue/Kqueue/index.html

Module KqueueSource

kqueue(): Kqueue is a scalable event notification interface available on macOS and various BSD systems (FreeBSD, OpenBSD, etc).

Consult the kqueue manpages to see the full list of functionality:

Sourcetype t
Sourcemodule Timeout : sig ... end
Sourcemodule Note : sig ... end
Sourcemodule Filter : sig ... end
Sourcemodule Flag : sig ... end
Sourcemodule Event_list : sig ... end
Sourceval create : unit -> t

create creates a new kernel event queue.

Sourceval kevent : t -> changelist:Event_list.t -> eventlist:Event_list.t -> Timeout.t -> int

kevent is used to register new events, and fetch any ready events from the kernel queue.

changelist is the list of new events to be submitted.

eventlist is the container where the kernel queue fill fill any new events that are ready for the user.

If eventlist is empty the kevent call will return immediately even if a non zero timeout is used. The response returns the count of new events returned by the kernel queue.

Sourceval close : t -> unit

close closes the kernel queue.

Sourcemodule Util : sig ... end
Sourceval available : bool

available Indicates if the system where this library was built has kqueue available.

OCaml

Innovation. Community. Security.