package luv

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Inter-loop communication.

See Inter-thread communication in the user guide and uv_async_t — Async handle in libuv.

type t = [ `Async ] Handle.t

Binds uv_async_t.

Note that values of this type can be passed to functions in Luv.Handle, in addition to the functions in this module. In particular, see Luv.Handle.close.

val init : ?loop:Loop.t -> (t -> unit) -> (t, Error.t) Stdlib.result

Allocates and initializes an async handle.

Binds uv_async_init.

The handle should be cleaned up with Luv.Handle.close when no longer needed.

val send : t -> (unit, Error.t) Stdlib.result

Triggers a call to the handle's callback by the handle's loop.

Binds uv_async_send.

OCaml

Innovation. Community. Security.