moonpool/picos_std/Picos_std_awaitable/Awaitable/Awaiter/index.html
2024-12-04 16:11:59 +00:00

2 lines
2.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>Awaiter (picos_std.Picos_std_awaitable.Awaitable.Awaiter)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">picos_std</a> &#x00BB; <a href="../../index.html">Picos_std_awaitable</a> &#x00BB; <a href="../index.html">Awaitable</a> &#x00BB; Awaiter</nav><header class="odoc-preamble"><h1>Module <code><span>Awaitable.Awaiter</span></code></h1><p>Low level interface for more flexible waiting.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type subst anchored" id="type-awaitable"><a href="#type-awaitable" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a awaitable</span></span><span> := <span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p>An erased type alias for <a href="../index.html#type-t"><code>Awaitable.t</code></a>.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Represents a single use awaiter of a signal to an <a href="#type-awaitable"><code>awaitable</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><span><span class="type-var">'a</span> <a href="#type-awaitable">awaitable</a></span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../../picos/Picos/Trigger/index.html#type-t">Picos.Trigger.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>add awaitable trigger</code> creates a single use awaiter, adds it to the FIFO associated with the awaitable, and returns the awaiter.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span><span class="keyword">val</span> remove : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>remove awaiter</code> marks the awaiter as having been signaled and removes it from the FIFO associated with the awaitable.</p><p> If the associated trigger is used with only one awaiter and the <code>Trigger.awaitawait</code> on the trigger returns <code>None</code>, there is no need to explicitly remove the awaiter, because it has already been removed.</p></div></div></div></body></html>