package luv

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

luv-0.5.5.tar.gz
sha256=a81268ceb85b8cffbeb5e5a9fdb4c6e724266ce0dee1f39afc4bb4a17703d749
md5=5d2335fb57ffe228151cc492888ca2dc

doc/luv/Luv/Thread/index.html

Module Luv.ThreadSource

Threads.

See Threads in the user guide and Threading and synchronization utilities in libuv.

Sourcetype t
Sourceval self : unit -> t

Returns the representation of the calling thread.

Binds uv_thread_self. See pthread_self(3p).

Sourceval equal : t -> t -> bool

Compares two thread values for equality.

Binds uv_thread_equal. See pthread_equal(3p).

Sourceval create : ?stack_size:int -> (unit -> unit) -> (t, Error.t) Result.result

Starts a new thread, which will run the given function.

Binds uv_thread_create. See pthread_create(3p).

Sourceval create_c : ?stack_size:int -> ?argument:nativeint -> nativeint -> (t, Error.t) Result.result

Like Luv.Thread.create, but runs a C function by pointer.

The C function should have signature (*)(void*). The default value of ?argument is NULL (0).

Sourceval join : t -> (unit, Error.t) Result.result

Waits for the given thread to terminate.

Binds uv_thread_join. See pthread_join(3p).

OCaml

Innovation. Community. Security.