ocaml-opentelemetry/opentelemetry-client/Opentelemetry_client/Bounded_queue/index.html
2026-04-06 19:57:49 +00:00

2 lines
4.5 KiB
HTML
Raw Permalink 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>Bounded_queue (opentelemetry-client.Opentelemetry_client.Bounded_queue)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.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">Index</a> &#x00BB; <a href="../../index.html">opentelemetry-client</a> &#x00BB; <a href="../index.html">Opentelemetry_client</a> &#x00BB; Bounded_queue</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry_client.Bounded_queue</span></code></h1><p>Interface for a thread-safe, bounded queue.</p><p>After the high watermark is reached, pushing items into the queue will instead discard them.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec exception anchored" id="exception-Closed"><a href="#exception-Closed" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Closed</span></span></code></div><div class="spec-doc"><p>Raised when pushing into a closed queue</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-pop_result"><a href="#type-pop_result" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a pop_result</span></span><span> = </span><span>[ </span></code><ol><li id="type-pop_result.Empty" class="def variant constructor anchored"><a href="#type-pop_result.Empty" class="anchor"></a><code><span>| </span><span>`Empty</span></code></li><li id="type-pop_result.Closed" class="def variant constructor anchored"><a href="#type-pop_result.Closed" class="anchor"></a><code><span>| </span><span>`Closed</span></code></li><li id="type-pop_result.Item" class="def variant constructor anchored"><a href="#type-pop_result.Item" class="anchor"></a><code><span>| </span><span>`Item <span class="keyword">of</span> <span class="type-var">'a</span></span></code></li></ol><code><span> ]</span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Common"><a href="#module-Common" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Common/index.html">Common</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Recv"><a href="#module-Recv" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Recv/index.html">Recv</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Receiving side</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Send"><a href="#module-Send" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Send/index.html">Send</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Sending side</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><span> = </span><span>{</span></code><ol><li id="type-t.send" class="def record field anchored"><a href="#type-t.send" class="anchor"></a><code><span>send : <span><span class="type-var">'a</span> <a href="Send/index.html#type-t">Send.t</a></span>;</span></code></li><li id="type-t.recv" class="def record field anchored"><a href="#type-t.recv" class="anchor"></a><code><span>recv : <span><span class="type-var">'a</span> <a href="Recv/index.html#type-t">Recv.t</a></span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A bounded queue, with multiple producers and potentially multiple consumers.</p><p>All functions must be thread-safe except for <code>try_pop</code> which might not have to be depending on the context (e.g. a Lwt-specific queue implementation will consume only from the Lwt thread).</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Defaults"><a href="#module-Defaults" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Defaults/index.html">Defaults</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>