package index

  1. Overview
  2. Docs
A platform-agnostic multi-level index for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

index-1.3.2.tbz
sha256=0e46ebc785eb5b947bcb6e04075dda694d7e951c5ac51103e4d5fa5105df5d14
sha512=fd82ba852bb43eae8fefca2563d114bc2fa99e0ba98c828bccc2e81737a05156297b64b5894e2d0a58457a3382730a34e16cf16c844f8a6e6844c2684d79c7b5

doc/index/Index/module-type-THREAD/index.html

Module type Index.THREADSource

Cooperative threads.

type 'a t

The type of thread handles.

val async : (unit -> 'a) -> 'a t

async f creates a new thread of control which executes f () and returns the corresponding thread handle. The thread terminates whenever f () returns a value or raises an exception.

val await : 'a t -> ('a, [ `Async_exn of exn ]) result

await t blocks on the termination of t.

val return : 'a -> 'a t

return () is a pre-terminated thread handle.

val yield : unit -> unit

Re-schedule the calling thread without suspending it.

OCaml

Innovation. Community. Security.