package luv

  1. Overview
  2. Docs
Binding to libuv: cross-platform asynchronous I/O

Install

Dune Dependency

Authors

Maintainers

Sources

luv-0.5.4.tar.gz
sha256=9c5e27109e8887339e5e8145c65f62d714cfea439ed165be88726076f5acee05
md5=5f4e140e7bbcca2b8a0d876fdeba9a07

doc/luv/Luv/Thread_pool/index.html

Module Luv.Thread_poolSource

Thread pool.

See libuv thread pool in the user guide and Thread pool work scheduling in libuv.

Sourcemodule Request : sig ... end

Optional request objects for canceling thread pool requests. Binds uv_work_t.

Sourceval queue_work : ?loop:Loop.t -> ?request:Request.t -> (unit -> unit) -> ((unit, Error.t) Result.result -> unit) -> unit

Schedules a function to be called by a thread in the thread pool.

Binds uv_queue_work.

In Luv.Thread_pool.queue_work f after, f is the function that will be called in the thread pool. after will be called by the libuv loop (that is, typically, in the main thread) after f completes, or immediately, in case there is an error scheduling f.

Sourceval queue_c_work : ?loop:Loop.t -> ?request:Request.t -> ?argument:nativeint -> nativeint -> ((unit, Error.t) Result.result -> unit) -> unit

Schedules a C function to be called by a thread in the thread pool.

Alternative binding to uv_queue_work.

The C function is specified by its address. It should have signature (*)(void*). The default value is ?argument is NULL (0).

Sourceval set_size : ?if_not_already_set:bool -> int -> unit

Sets UV_THREADPOOL_SIZE.

This function should be called as soon during process startup as possible.

OCaml

Innovation. Community. Security.