linol/lwt/Lwt_main/Enter_iter_hooks/index.html
2024-05-08 15:15:46 +00:00

2 lines
3.6 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>Enter_iter_hooks (lwt.Lwt_main.Enter_iter_hooks)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><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">lwt</a> &#x00BB; <a href="../index.html">Lwt_main</a> &#x00BB; Enter_iter_hooks</nav><header class="odoc-preamble"><h1>Module <code><span>Lwt_main.Enter_iter_hooks</span></code></h1><p>Hooks, of type <code>unit -&gt; unit</code>, that are called before each iteration of the Lwt main loop.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 4.2.0</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-kind"><a href="#type-kind" class="anchor"></a><code><span><span class="keyword">type</span> <span>'return_value kind</span></span><span> = <span class="type-var">'return_value</span></span></code></div><div class="spec-doc"><p>Hooks are functions of either type <code>unit -&gt; unit</code> or <code>unit -&gt; unit Lwt.t</code>; this type constructor is used only to express both possibilities in one signature.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-hook"><a href="#type-hook" class="anchor"></a><code><span><span class="keyword">type</span> hook</span></code></div><div class="spec-doc"><p>Values of type <code>hook</code> represent hooks that have been added, so that they can be removed later (if needed).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_first"><a href="#val-add_first" class="anchor"></a><code><span><span class="keyword">val</span> add_first : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span>unit <a href="#type-kind">kind</a></span>)</span> <span class="arrow">&#45;&gt;</span></span> <a href="#type-hook">hook</a></span></code></div><div class="spec-doc"><p>Adds a hook to the hook sequence underlying this module, to be run <em>first</em>, before any other hooks already added.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_last"><a href="#val-add_last" class="anchor"></a><code><span><span class="keyword">val</span> add_last : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span>unit <a href="#type-kind">kind</a></span>)</span> <span class="arrow">&#45;&gt;</span></span> <a href="#type-hook">hook</a></span></code></div><div class="spec-doc"><p>Adds a hook to the hook sequence underlying this module, to be run <em>last</em>, after any other hooks already added.</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-hook">hook</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Removes a hook added by <a href="#val-add_first"><code>add_first</code></a> or <a href="#val-add_last"><code>add_last</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove_all"><a href="#val-remove_all" class="anchor"></a><code><span><span class="keyword">val</span> remove_all : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Removes all hooks from the hook sequence underlying this module.</p></div></div></div></body></html>