package luv
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=3d96ae0e118385f60921787826c2e4665e9809f9748ec7dec276e821e4761bf2
md5=a196396b63bbe9ff9e8b932b58010b18
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.
Optional request objects for canceling thread pool requests. Binds uv_work_t.
val queue_work :
?loop:Loop.t ->
?request:Request.t ->
(unit -> unit) ->
((unit, Error.t) Result.result -> unit) ->
unitSchedules 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.
val queue_c_work :
?loop:Loop.t ->
?request:Request.t ->
?argument:nativeint ->
nativeint ->
((unit, Error.t) Result.result -> unit) ->
unitSchedules 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).
Sets UV_THREADPOOL_SIZE.
This function should be called as soon during process startup as possible.