ocaml-opentelemetry/0.3/opentelemetry/Opentelemetry/Lock/index.html
2022-07-08 14:23:35 -04:00

2 lines
No EOL
1.9 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>Lock (opentelemetry.Opentelemetry.Lock)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.0"/><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">opentelemetry</a> &#x00BB; <a href="../index.html">Opentelemetry</a> &#x00BB; Lock</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry.Lock</span></code></h1><p>Global lock</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value" id="val-set_mutex" class="anchored"><a href="#val-set_mutex" class="anchor"></a><code><span><span class="keyword">val</span> set_mutex : <span>lock:<span>( <span>unit <span class="arrow">&#45;&gt;</span></span> unit )</span> <span class="arrow">&#45;&gt;</span></span> <span>unlock:<span>( <span>unit <span class="arrow">&#45;&gt;</span></span> unit )</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Set a pair of lock/unlock functions that are used to protect access to global state, if needed. By default these do nothing.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-with_lock" class="anchored"><a href="#val-with_lock" class="anchor"></a><code><span><span class="keyword">val</span> with_lock : <span><span>( <span>unit <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></code></div><div class="spec-doc"><p>Call <code>f()</code> while holding the mutex defined <a href="#val-set_mutex"><code>set_mutex</code></a>, then release the mutex.</p></div></div></div></body></html>