Skip to content

Commit

Permalink
deploy: e56dbc6
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Feb 7, 2024
1 parent aea8b1e commit 86fd296
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dev/moonpool/Moonpool/Fifo_pool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<span><span class="optlabel">?on_exn</span>:<span>(<span>exn <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../ocaml/Stdlib/Printexc/index.html#type-raw_backtrace">Stdlib.Printexc.raw_backtrace</a> <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?around_task</span>:<span>(<span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'b</span>)</span> * <span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'b</span> <span class="arrow">&#45;&gt;</span></span> unit)</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?num_threads</span>:int <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Arguments used in <a href="#val-create"><code>create</code></a>. See <a href="#val-create"><code>create</code></a> for explanations.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>create ()</code> makes a new thread pool.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_init_thread</span> <p>called at the beginning of each new thread in the pool.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">min</span> <p>minimum size of the pool. See <a href="#type-create_args"><code>Pool.create_args</code></a>. The default is <code>Domain.recommended_domain_count()</code>, ie one worker per CPU core. On OCaml 4 the default is <code>4</code> (since there is only one domain).</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_exit_thread</span> <p>called at the end of each worker thread in the pool.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">around_task</span> <p>a pair of <code>before, after</code> functions ran around each task. See <a href="#type-create_args"><code>Pool.create_args</code></a>.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>with_ () f</code> calls <code>f pool</code>, where <code>pool</code> is obtained via <a href="#val-create"><code>create</code></a>. When <code>f pool</code> returns or fails, <code>pool</code> is shutdown and its resources are released. Most parameters are the same as in <a href="#val-create"><code>create</code></a>.</p></div></div></div></body></html>
<span><span class="optlabel">?name</span>:string <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Arguments used in <a href="#val-create"><code>create</code></a>. See <a href="#val-create"><code>create</code></a> for explanations.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>create ()</code> makes a new thread pool.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_init_thread</span> <p>called at the beginning of each new thread in the pool.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">min</span> <p>minimum size of the pool. See <a href="#type-create_args"><code>Pool.create_args</code></a>. The default is <code>Domain.recommended_domain_count()</code>, ie one worker per CPU core. On OCaml 4 the default is <code>4</code> (since there is only one domain).</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_exit_thread</span> <p>called at the end of each worker thread in the pool.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">around_task</span> <p>a pair of <code>before, after</code> functions ran around each task. See <a href="#type-create_args"><code>Pool.create_args</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">name</span> <p>name for the pool, used in tracing (since NEXT_RELEASE)</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>with_ () f</code> calls <code>f pool</code>, where <code>pool</code> is obtained via <a href="#val-create"><code>create</code></a>. When <code>f pool</code> returns or fails, <code>pool</code> is shutdown and its resources are released. Most parameters are the same as in <a href="#val-create"><code>create</code></a>.</p></div></div></div></body></html>
3 changes: 2 additions & 1 deletion dev/moonpool/Moonpool/Ws_pool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<span><span class="optlabel">?on_exn</span>:<span>(<span>exn <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../ocaml/Stdlib/Printexc/index.html#type-raw_backtrace">Stdlib.Printexc.raw_backtrace</a> <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?around_task</span>:<span>(<span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'b</span>)</span> * <span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'b</span> <span class="arrow">&#45;&gt;</span></span> unit)</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?num_threads</span>:int <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Arguments used in <a href="#val-create"><code>create</code></a>. See <a href="#val-create"><code>create</code></a> for explanations.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>create ()</code> makes a new thread pool.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_init_thread</span> <p>called at the beginning of each new thread in the pool.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">num_threads</span> <p>size of the pool, ie. number of worker threads. It will be at least <code>1</code> internally, so <code>0</code> or negative values make no sense. The default is <code>Domain.recommended_domain_count()</code>, ie one worker thread per CPU core. On OCaml 4 the default is <code>4</code> (since there is only one domain).</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_exit_thread</span> <p>called at the end of each thread in the pool</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">around_task</span> <p>a pair of <code>before, after</code>, where <code>before pool</code> is called before a task is processed, on the worker thread about to run it, and returns <code>x</code>; and <code>after pool x</code> is called by the same thread after the task is over. (since 0.2)</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>with_ () f</code> calls <code>f pool</code>, where <code>pool</code> is obtained via <a href="#val-create"><code>create</code></a>. When <code>f pool</code> returns or fails, <code>pool</code> is shutdown and its resources are released.</p><p>Most parameters are the same as in <a href="#val-create"><code>create</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.3</li></ul></div></div></div></body></html>
<span><span class="optlabel">?name</span>:string <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Arguments used in <a href="#val-create"><code>create</code></a>. See <a href="#val-create"><code>create</code></a> for explanations.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>create ()</code> makes a new thread pool.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_init_thread</span> <p>called at the beginning of each new thread in the pool.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">num_threads</span> <p>size of the pool, ie. number of worker threads. It will be at least <code>1</code> internally, so <code>0</code> or negative values make no sense. The default is <code>Domain.recommended_domain_count()</code>, ie one worker thread per CPU core. On OCaml 4 the default is <code>4</code> (since there is only one domain).</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">on_exit_thread</span> <p>called at the end of each thread in the pool</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">around_task</span> <p>a pair of <code>before, after</code>, where <code>before pool</code> is called before a task is processed, on the worker thread about to run it, and returns <code>x</code>; and <code>after pool x</code> is called by the same thread after the task is over. (since 0.2)</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">name</span> <p>a name for this thread pool, used if tracing is enabled (since NEXT_RELEASE)</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>, <span class="type-var">_</span>)</span> <a href="#type-create_args">create_args</a></span></span></code></div><div class="spec-doc"><p><code>with_ () f</code> calls <code>f pool</code>, where <code>pool</code> is obtained via <a href="#val-create"><code>create</code></a>. When <code>f pool</code> returns or fails, <code>pool</code> is shutdown and its resources are released.</p><p>Most parameters are the same as in <a href="#val-create"><code>create</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.3</li></ul></div></div></div></body></html>

0 comments on commit 86fd296

Please sign in to comment.