You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4 lines
3.3 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tasks (infer.InferModules.Tasks)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="../../index.html">infer</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferModules.Tasks</span></h1></header><div class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>t</code><code></code><code></code></div><div class="doc"><p>A sequence of tasks that can be executed in parallel,
with a continuation to be executed at the end</p></div></div><div class="spec type" id="type-closure"><a href="#type-closure" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>closure</code><code><span class="keyword"> = </span>unit <span class="keyword">&#8209;&gt;</span> unit</code><code></code></div><div class="doc"><p>Each task/continuation executes a closure</p></div></div><div class="spec val" id="val-aggregate"><a href="#val-aggregate" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>aggregate : size:int <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"></div></div><div class="spec val" id="val-create"><a href="#val-create" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>create : ?&#8288;continuation:<a href="index.html#type-closure">closure</a> option <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-closure">closure</a> list <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>Create tasks with a list of closures to be executed in parallel,
and an optional continuation to be executed afterwards</p></div></div><div class="spec val" id="val-run"><a href="#val-run" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>run : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>Run the closures and continuation</p></div></div><div class="spec val" id="val-fork_protect"><a href="#val-fork_protect" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>fork_protect : f:(<span class="type-var">'a</span> <span class="keyword">&#8209;&gt;</span> <span class="type-var">'b</span>) <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span> <span class="keyword">&#8209;&gt;</span> <span class="type-var">'b</span></code></div><div class="doc"><p>does the bookkeeping necessary to safely execute an infer function <code class="code">f</code> after a call to fork(2)</p></div></div><div class="spec module" id="module-Runner"><a href="#module-Runner" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="Runner/index.html">Runner</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="doc"></div></div></body></html>