moonpool/lwt/Lwt_engine/class-poll_based/index.html
2025-09-26 19:08:06 +00:00

4 lines
2.1 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>poll_based (lwt.Lwt_engine.poll_based)</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">lwt</a> &#x00BB; <a href="../index.html">Lwt_engine</a> &#x00BB; poll_based</nav><header class="odoc-preamble"><h1>Class <code><span>Lwt_engine.poll_based</span></code></h1><p>Abstract class for engines based on a poll-like function.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec inherit"><code><span><span class="keyword">inherit</span> <a href="../class-type-t/index.html">t</a></span></code></div></div><div class="odoc-spec"><div class="spec method anchored" id="method-poll"><a href="#method-poll" class="anchor"></a><code><span><span class="keyword">method</span> <span class="keyword">private</span> <span class="keyword">virtual</span> poll : <span><span><span>(<a href="../../../ocaml/Unix/index.html#type-file_descr">Unix.file_descr</a> * bool * bool)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
<span><span>(<a href="../../../ocaml/Unix/index.html#type-file_descr">Unix.file_descr</a> * bool * bool)</span> list</span></span></code></div><div class="spec-doc"><p><code>poll fds tiomeout</code>, where <code>fds</code> is a list of tuples of the form <code>(fd, check_readable, check_writable)</code>, waits for either:</p><ul><li>one of the file descriptor with <code>check_readable</code> set to <code>true</code> to become readable</li><li>one of the file descriptor with <code>check_writable</code> set to <code>true</code> to become writable</li><li>timeout to expire</li></ul><p>and returns the list of file descriptors with their readable and writable status.</p></div></div></div></body></html>