Skip to content

Commit

Permalink
Update picos doc for main
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Oct 22, 2024
1 parent 3705097 commit 4ada43e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/picos/Picos/Fiber/FLS/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>FLS (picos.Picos.Fiber.FLS)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script><script>let base_url = '../../../../';
let search_urls = ['../../../db.js','../../../../sherlodoc.js'];
</script><script src="../../../../odoc.support/odoc_search.js" defer="defer"></script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../../index.html">picos</a> &#x00BB; <a href="../../index.html">Picos</a> &#x00BB; <a href="../index.html">Fiber</a> &#x00BB; FLS</nav><div class="odoc-search"><div class="search-inner"><input class="search-bar" placeholder="🔎 Search..."/><div class="search-snake"></div><div class="search-result"></div></div></div><header class="odoc-preamble"><h1>Module <code><span>Fiber.FLS</span></code></h1><p>Fiber local storage</p><p>Fiber local storage is intended for use as a low overhead storage mechanism for fiber extensions. For example, one might associate a priority value with each fiber for a scheduler that uses a priority queue or one might use FLS to store unique id values for fibers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type subst anchored" id="type-fiber"><a href="#type-fiber" class="anchor"></a><code><span><span class="keyword">type</span> fiber</span><span> := <a href="../index.html#type-t">t</a></span></code></div><div class="spec-doc"><p>Destructively substituted alias for <a href="../index.html#type-t"><code>Fiber.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> <span>'a t</span></span></code></div><div class="spec-doc"><p>Represents a key for storing values of type <code>'a</code> in storage associated with fibers.</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>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>new_key initial</code> allocates a new key for associating values in storage associated with fibers. The <code>initial</code> value for every fiber is either the given <code>Constant</code> or is <code>Computed</code> with the given function. If the initial value is a constant, no value needs to be stored unless the value is explicitly updated.</p><p>⚠️ New keys should not be created dynamically.</p></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Not_set"><a href="#exception-Not_set" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Not_set</span></span></code></div><div class="spec-doc"><p>Raised by <a href="#val-get_exn"><code>get_exn</code></a> in case value has not been <a href="#val-set"><code>set</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_exn"><a href="#val-get_exn" class="anchor"></a><code><span><span class="keyword">val</span> get_exn : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>get_exn fiber key</code> returns the value associated with the <code>key</code> in the storage associated with the <code>fiber</code> or raises <a href="#exception-Not_set"><code>Not_set</code></a> using <code>raise_notrace</code>.</p><p>⚠️ It is only safe to call <code>get_exn</code> from the fiber itself or when the fiber is known not to be running.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get"><a href="#val-get" class="anchor"></a><code><span><span class="keyword">val</span> get : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="label">default</span>:<span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>get fiber key ~default</code> returns the value associated with the <code>key</code> in the storage associated with the <code>fiber</code> or the <code>default</code> value.</p><p>⚠️ It is only safe to call <code>get</code> from the fiber itself or when the fiber is known not to be running.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set"><a href="#val-set" class="anchor"></a><code><span><span class="keyword">val</span> set : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>set fiber key value</code> sets the <code>value</code> associated with the <code>key</code> to the given value in the storage associated with the <code>fiber</code>.</p><p>⚠️ It is only safe to call <code>set</code> from the fiber itself or when the fiber is known not to be running.</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-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>remove fiber key</code> removes the value, if any, associated with the <code>key</code> from the storage associated with the <code>fiber</code>.</p><p>⚠️ It is only safe to call <code>remove</code> from the fiber itself or when the fiber is known not to be running.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-reserve"><a href="#val-reserve" class="anchor"></a><code><span><span class="keyword">val</span> reserve : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>reserve fiber key</code> ensures that sufficient space has been allocated to associate a value with the specified <code>key</code> such that a subsequent <a href="#val-set"><code>set</code></a> with the <code>key</code> will not allocate.</p><p>ℹ️ This can be used to optimize the population of the FLS and to avoid performing memory allocations in critical sections.</p><p>⚠️ It is only safe to call <code>reserve</code> from the fiber itself or when the fiber is known not to be running.</p></div></div></div></body></html>
</script><script src="../../../../odoc.support/odoc_search.js" defer="defer"></script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../../index.html">picos</a> &#x00BB; <a href="../../index.html">Picos</a> &#x00BB; <a href="../index.html">Fiber</a> &#x00BB; FLS</nav><div class="odoc-search"><div class="search-inner"><input class="search-bar" placeholder="🔎 Search..."/><div class="search-snake"></div><div class="search-result"></div></div></div><header class="odoc-preamble"><h1>Module <code><span>Fiber.FLS</span></code></h1><p>Fiber local storage</p><p>Fiber local storage is intended for use as a low overhead storage mechanism for fiber extensions. For example, one might associate a priority value with each fiber for a scheduler that uses a priority queue or one might use FLS to store unique id values for fibers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type subst anchored" id="type-fiber"><a href="#type-fiber" class="anchor"></a><code><span><span class="keyword">type</span> fiber</span><span> := <a href="../index.html#type-t">t</a></span></code></div><div class="spec-doc"><p>Destructively substituted alias for <a href="../index.html#type-t"><code>Fiber.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> <span>'a t</span></span></code></div><div class="spec-doc"><p>Represents a key for storing values of type <code>'a</code> in storage associated with fibers.</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>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>create ()</code> allocates a new key for associating values in storage associated with fibers.</p><p>⚠️ New keys should not be created dynamically.</p></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Not_set"><a href="#exception-Not_set" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Not_set</span></span></code></div><div class="spec-doc"><p>Raised by <a href="#val-get_exn"><code>get_exn</code></a> in case value has not been <a href="#val-set"><code>set</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_exn"><a href="#val-get_exn" class="anchor"></a><code><span><span class="keyword">val</span> get_exn : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>get_exn fiber key</code> returns the value associated with the <code>key</code> in the storage associated with the <code>fiber</code> or raises <a href="#exception-Not_set"><code>Not_set</code></a> using <code>raise_notrace</code>.</p><p>⚠️ It is only safe to call <code>get_exn</code> from the fiber itself or when the fiber is known not to be running.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get"><a href="#val-get" class="anchor"></a><code><span><span class="keyword">val</span> get : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="label">default</span>:<span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>get fiber key ~default</code> returns the value associated with the <code>key</code> in the storage associated with the <code>fiber</code> or the <code>default</code> value.</p><p>⚠️ It is only safe to call <code>get</code> from the fiber itself or when the fiber is known not to be running.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set"><a href="#val-set" class="anchor"></a><code><span><span class="keyword">val</span> set : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>set fiber key value</code> sets the <code>value</code> associated with the <code>key</code> to the given value in the storage associated with the <code>fiber</code>.</p><p>⚠️ It is only safe to call <code>set</code> from the fiber itself or when the fiber is known not to be running.</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-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>remove fiber key</code> removes the value, if any, associated with the <code>key</code> from the storage associated with the <code>fiber</code>.</p><p>⚠️ It is only safe to call <code>remove</code> from the fiber itself or when the fiber is known not to be running.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-reserve"><a href="#val-reserve" class="anchor"></a><code><span><span class="keyword">val</span> reserve : <span><a href="#type-fiber">fiber</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>reserve fiber key</code> ensures that sufficient space has been allocated to associate a value with the specified <code>key</code> such that a subsequent <a href="#val-set"><code>set</code></a> with the <code>key</code> will not allocate.</p><p>ℹ️ This can be used to optimize the population of the FLS and to avoid performing memory allocations in critical sections.</p><p>⚠️ It is only safe to call <code>reserve</code> from the fiber itself or when the fiber is known not to be running.</p></div></div></div></body></html>
2 changes: 1 addition & 1 deletion doc/picos/db.js

Large diffs are not rendered by default.

0 comments on commit 4ada43e

Please sign in to comment.