ocaml-containers/dev/containers-thread/CCThread/Barrier/index.html
2021-01-26 10:48:55 +00:00

2 lines
No EOL
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Barrier (containers-thread.CCThread.Barrier)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">containers-thread</a> &#x00BB; <a href="../index.html">CCThread</a> &#x00BB; Barrier</nav><h1>Module <code>CCThread.Barrier</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Barrier, used to synchronize threads</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a barrier.</p></dd></dl><dl><dt class="spec value" id="val-reset"><a href="#val-reset" class="anchor"></a><code><span class="keyword">val</span> reset : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Reset to initial (non-triggered) state.</p></dd></dl><dl><dt class="spec value" id="val-wait"><a href="#val-wait" class="anchor"></a><code><span class="keyword">val</span> wait : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>wait b</code> waits for barrier <code>b</code> to be activated by <code>activate b</code>. All threads calling this wait until <code>activate b</code> is called. If <code>b</code> is already activated, <code>wait b</code> does nothing.</p></dd></dl><dl><dt class="spec value" id="val-activate"><a href="#val-activate" class="anchor"></a><code><span class="keyword">val</span> activate : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>activate b</code> unblocks all threads that were waiting on <code>b</code>.</p></dd></dl><dl><dt class="spec value" id="val-activated"><a href="#val-activated" class="anchor"></a><code><span class="keyword">val</span> activated : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p><code>activated b</code> returns <code>true</code> iff <code>activate b</code> was called, and <code>reset b</code> was not called since. In other words, <code>activated b = true</code> means <code>wait b</code> will not block.</p></dd></dl></div></body></html>