nim-chronos/api/chronos/internal/asyncengine.html

1133 lines
110 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- CSS -->
<title>chronos/internal/asyncengine</title>
<link rel="stylesheet" type="text/css" href="../../nimdoc.out.css">
<script type="text/javascript" src="../../dochack.js"></script>
<script type="text/javascript">
function main() {
var pragmaDots = document.getElementsByClassName("pragmadots");
for (var i = 0; i < pragmaDots.length; i++) {
pragmaDots[i].onclick = function(event) {
// Hide tease
event.target.parentNode.style.display = "none";
// Show actual
event.target.parentNode.nextElementSibling.style.display = "inline";
}
}
function switchTheme(e) {
if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('theme', 'dark');
} else {
document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light');
}
}
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
if (toggleSwitch !== null) {
toggleSwitch.addEventListener('change', switchTheme, false);
}
var currentTheme = localStorage.getItem('theme');
if (!currentTheme && window.matchMedia('(prefers-color-scheme: dark)').matches) {
currentTheme = 'dark';
}
if (currentTheme) {
document.documentElement.setAttribute('data-theme', currentTheme);
if (currentTheme === 'dark' && toggleSwitch !== null) {
toggleSwitch.checked = true;
}
}
}
window.addEventListener('DOMContentLoaded', main);
</script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">chronos/internal/asyncengine</h1>
<div class="row">
<div class="three columns">
<div class="theme-switch-wrapper">
<label class="theme-switch" for="checkbox">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
&nbsp;&nbsp;&nbsp; <em>Dark Mode</em>
</div>
<div id="global-links">
<ul class="simple">
<li>
<a href="../../theindex.html">Index</a>
</li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="text" id="searchInput"
onkeyup="search()" />
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
<ul class="simple simple-toc-section">
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#AsyncCallback"
title="AsyncCallback = InternalAsyncCallback">AsyncCallback</a></li>
<li><a class="reference" href="#AsyncFD"
title="AsyncFD = distinct cint">AsyncFD</a></li>
<li><a class="reference" href="#PDispatcher"
title="PDispatcher = ref object of PDispatcherBase">PDispatcher</a></li>
<li><a class="reference" href="#TimerCallback"
title="TimerCallback = ref object
finishAt*: Moment
function*: AsyncCallback">TimerCallback</a></li>
<li><a class="reference" href="#TrackerBase"
title="TrackerBase = ref object of RootRef
id*: string
dump*: proc (): string {.gcsafe, raises: [].}
isLeaked*: proc (): bool {.gcsafe, raises: [].}">TrackerBase</a></li>
<li><a class="reference" href="#TrackerCounter"
title="TrackerCounter = object
opened*: uint64
closed*: uint64">TrackerCounter</a></li>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#10" id="60">Consts</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#MaxEventsCount"
title="MaxEventsCount = 64">MaxEventsCount</a></li>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">==
<li><a class="reference" href="#%3D%3D%2CAsyncFD%2CAsyncFD"
title="`==`(x: AsyncFD; y: AsyncFD): bool">`==`(x: AsyncFD; y: AsyncFD): bool</a></li>
</ul>
<ul class="simple nested-toc-section">addReader2
<li><a class="reference" href="#addReader2%2CAsyncFD%2CCallbackFunc%2Cpointer"
title="addReader2(fd: AsyncFD; cb: CallbackFunc; udata: pointer = nil): Result[void,
OSErrorCode]">addReader2(fd: AsyncFD; cb: CallbackFunc; udata: pointer = nil): Result[void,
OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">addTimer
<li><a class="reference" href="#addTimer%2Cint64%2CCallbackFunc%2Cpointer"
title="addTimer(at: int64; cb: CallbackFunc; udata: pointer = nil)">addTimer(at: int64; cb: CallbackFunc; udata: pointer = nil)</a></li>
<li><a class="reference" href="#addTimer%2CMoment%2CCallbackFunc%2Cpointer"
title="addTimer(at: Moment; cb: CallbackFunc; udata: pointer = nil)">addTimer(at: Moment; cb: CallbackFunc; udata: pointer = nil)</a></li>
<li><a class="reference" href="#addTimer%2Cuint64%2CCallbackFunc%2Cpointer"
title="addTimer(at: uint64; cb: CallbackFunc; udata: pointer = nil)">addTimer(at: uint64; cb: CallbackFunc; udata: pointer = nil)</a></li>
</ul>
<ul class="simple nested-toc-section">addTracker
<li><a class="reference" href="#addTracker%2Cstring%2CT"
title="addTracker[T](id: string; tracker: T)">addTracker[T](id: string; tracker: T)</a></li>
</ul>
<ul class="simple nested-toc-section">addWriter2
<li><a class="reference" href="#addWriter2%2CAsyncFD%2CCallbackFunc%2Cpointer"
title="addWriter2(fd: AsyncFD; cb: CallbackFunc; udata: pointer = nil): Result[void,
OSErrorCode]">addWriter2(fd: AsyncFD; cb: CallbackFunc; udata: pointer = nil): Result[void,
OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">callIdle
<li><a class="reference" href="#callIdle%2CInternalAsyncCallback"
title="callIdle(acb: AsyncCallback)">callIdle(acb: AsyncCallback)</a></li>
<li><a class="reference" href="#callIdle%2CCallbackFunc"
title="callIdle(cbproc: CallbackFunc)">callIdle(cbproc: CallbackFunc)</a></li>
<li><a class="reference" href="#callIdle%2CCallbackFunc%2Cpointer"
title="callIdle(cbproc: CallbackFunc; data: pointer)">callIdle(cbproc: CallbackFunc; data: pointer)</a></li>
</ul>
<ul class="simple nested-toc-section">callSoon
<li><a class="reference" href="#callSoon%2CInternalAsyncCallback"
title="callSoon(acb: AsyncCallback)">callSoon(acb: AsyncCallback)</a></li>
<li><a class="reference" href="#callSoon%2CCallbackFunc"
title="callSoon(cbproc: CallbackFunc)">callSoon(cbproc: CallbackFunc)</a></li>
<li><a class="reference" href="#callSoon%2CCallbackFunc%2Cpointer"
title="callSoon(cbproc: CallbackFunc; data: pointer)">callSoon(cbproc: CallbackFunc; data: pointer)</a></li>
</ul>
<ul class="simple nested-toc-section">clearTimer
<li><a class="reference" href="#clearTimer%2CTimerCallback"
title="clearTimer(timer: TimerCallback)">clearTimer(timer: TimerCallback)</a></li>
</ul>
<ul class="simple nested-toc-section">closeHandle
<li><a class="reference" href="#closeHandle%2CAsyncFD%2CCallbackFunc"
title="closeHandle(fd: AsyncFD; aftercb: CallbackFunc = nil)">closeHandle(fd: AsyncFD; aftercb: CallbackFunc = nil)</a></li>
</ul>
<ul class="simple nested-toc-section">closeSocket
<li><a class="reference" href="#closeSocket%2CAsyncFD%2CCallbackFunc"
title="closeSocket(fd: AsyncFD; aftercb: CallbackFunc = nil)">closeSocket(fd: AsyncFD; aftercb: CallbackFunc = nil)</a></li>
</ul>
<ul class="simple nested-toc-section">getAsyncTimestamp
<li><a class="reference" href="#getAsyncTimestamp%2CDuration"
title="getAsyncTimestamp(a: Duration): auto">getAsyncTimestamp(a: Duration): auto</a></li>
</ul>
<ul class="simple nested-toc-section">getGlobalDispatcher
<li><a class="reference" href="#getGlobalDispatcher"
title="getGlobalDispatcher(): PDispatcher">getGlobalDispatcher(): PDispatcher</a></li>
</ul>
<ul class="simple nested-toc-section">getThreadDispatcher
<li><a class="reference" href="#getThreadDispatcher"
title="getThreadDispatcher(): PDispatcher">getThreadDispatcher(): PDispatcher</a></li>
</ul>
<ul class="simple nested-toc-section">getTracker
<li><a class="reference" href="#getTracker%2Cstring"
title="getTracker(id: string): TrackerBase">getTracker(id: string): TrackerBase</a></li>
</ul>
<ul class="simple nested-toc-section">getTrackerCounter
<li><a class="reference" href="#getTrackerCounter%2Cstring"
title="getTrackerCounter(name: string): TrackerCounter">getTrackerCounter(name: string): TrackerCounter</a></li>
</ul>
<ul class="simple nested-toc-section">internalCallTick
<li><a class="reference" href="#internalCallTick%2CInternalAsyncCallback"
title="internalCallTick(acb: AsyncCallback)">internalCallTick(acb: AsyncCallback)</a></li>
<li><a class="reference" href="#internalCallTick%2CCallbackFunc"
title="internalCallTick(cbproc: CallbackFunc)">internalCallTick(cbproc: CallbackFunc)</a></li>
<li><a class="reference" href="#internalCallTick%2CCallbackFunc%2Cpointer"
title="internalCallTick(cbproc: CallbackFunc; data: pointer)">internalCallTick(cbproc: CallbackFunc; data: pointer)</a></li>
</ul>
<ul class="simple nested-toc-section">isCounterLeaked
<li><a class="reference" href="#isCounterLeaked%2Cstring"
title="isCounterLeaked(name: string): bool">isCounterLeaked(name: string): bool</a></li>
</ul>
<ul class="simple nested-toc-section">newDispatcher
<li><a class="reference" href="#newDispatcher"
title="newDispatcher(): PDispatcher">newDispatcher(): PDispatcher</a></li>
</ul>
<ul class="simple nested-toc-section">poll
<li><a class="reference" href="#poll"
title="poll()">poll()</a></li>
</ul>
<ul class="simple nested-toc-section">raiseAsDefect
<li><a class="reference" href="#raiseAsDefect%2Cref.Exception%2Cstring"
title="raiseAsDefect(exc: ref Exception; msg: string)">raiseAsDefect(exc: ref Exception; msg: string)</a></li>
</ul>
<ul class="simple nested-toc-section">raiseOsDefect
<li><a class="reference" href="#raiseOsDefect%2COSErrorCode%2Cstring"
title="raiseOsDefect(error: OSErrorCode; msg = &quot;&quot;)">raiseOsDefect(error: OSErrorCode; msg = &quot;&quot;)</a></li>
</ul>
<ul class="simple nested-toc-section">register2
<li><a class="reference" href="#register2%2CAsyncFD"
title="register2(fd: AsyncFD): Result[void, OSErrorCode]">register2(fd: AsyncFD): Result[void, OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">removeReader2
<li><a class="reference" href="#removeReader2%2CAsyncFD"
title="removeReader2(fd: AsyncFD): Result[void, OSErrorCode]">removeReader2(fd: AsyncFD): Result[void, OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">removeTimer
<li><a class="reference" href="#removeTimer%2Cint64%2CCallbackFunc%2Cpointer"
title="removeTimer(at: int64; cb: CallbackFunc; udata: pointer = nil)">removeTimer(at: int64; cb: CallbackFunc; udata: pointer = nil)</a></li>
<li><a class="reference" href="#removeTimer%2CMoment%2CCallbackFunc%2Cpointer"
title="removeTimer(at: Moment; cb: CallbackFunc; udata: pointer = nil)">removeTimer(at: Moment; cb: CallbackFunc; udata: pointer = nil)</a></li>
<li><a class="reference" href="#removeTimer%2Cuint64%2CCallbackFunc%2Cpointer"
title="removeTimer(at: uint64; cb: CallbackFunc; udata: pointer = nil)">removeTimer(at: uint64; cb: CallbackFunc; udata: pointer = nil)</a></li>
</ul>
<ul class="simple nested-toc-section">removeWriter2
<li><a class="reference" href="#removeWriter2%2CAsyncFD"
title="removeWriter2(fd: AsyncFD): Result[void, OSErrorCode]">removeWriter2(fd: AsyncFD): Result[void, OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">runForever
<li><a class="reference" href="#runForever"
title="runForever()">runForever()</a></li>
</ul>
<ul class="simple nested-toc-section">setGlobalDispatcher
<li><a class="reference" href="#setGlobalDispatcher%2CPDispatcher"
title="setGlobalDispatcher(disp: PDispatcher)">setGlobalDispatcher(disp: PDispatcher)</a></li>
</ul>
<ul class="simple nested-toc-section">setThreadDispatcher
<li><a class="reference" href="#setThreadDispatcher%2CPDispatcher"
title="setThreadDispatcher(disp: PDispatcher)">setThreadDispatcher(disp: PDispatcher)</a></li>
</ul>
<ul class="simple nested-toc-section">setTimer
<li><a class="reference" href="#setTimer%2CMoment%2CCallbackFunc%2Cpointer"
title="setTimer(at: Moment; cb: CallbackFunc; udata: pointer = nil): TimerCallback">setTimer(at: Moment; cb: CallbackFunc; udata: pointer = nil): TimerCallback</a></li>
</ul>
<ul class="simple nested-toc-section">toException
<li><a class="reference" href="#toException%2COSErrorCode"
title="toException(v: OSErrorCode): ref OSError">toException(v: OSErrorCode): ref OSError</a></li>
</ul>
<ul class="simple nested-toc-section">trackCounter
<li><a class="reference" href="#trackCounter%2Cstring"
title="trackCounter(name: string)">trackCounter(name: string)</a></li>
</ul>
<ul class="simple nested-toc-section">unregister2
<li><a class="reference" href="#unregister2%2CAsyncFD"
title="unregister2(fd: AsyncFD): Result[void, OSErrorCode]">unregister2(fd: AsyncFD): Result[void, OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">unregisterAndCloseFd
<li><a class="reference" href="#unregisterAndCloseFd%2CAsyncFD"
title="unregisterAndCloseFd(fd: AsyncFD): Result[void, OSErrorCode]">unregisterAndCloseFd(fd: AsyncFD): Result[void, OSErrorCode]</a></li>
</ul>
<ul class="simple nested-toc-section">untrackCounter
<li><a class="reference" href="#untrackCounter%2Cstring"
title="untrackCounter(name: string)">untrackCounter(name: string)</a></li>
</ul>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#15" id="65">Iterators</a>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">trackerCounterKeys
<li><a class="reference" href="#trackerCounterKeys.i%2CPDispatcher"
title="trackerCounterKeys(loop: PDispatcher): string">trackerCounterKeys(loop: PDispatcher): string</a></li>
</ul>
<ul class="simple nested-toc-section">trackerCounters
<li><a class="reference" href="#trackerCounters.i%2CPDispatcher"
title="trackerCounters(loop: PDispatcher): tuple[name: string, value: TrackerCounter]">trackerCounters(loop: PDispatcher): tuple[name: string, value: TrackerCounter]</a></li>
</ul>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#19" id="69">Exports</a>
<ul class="simple simple-toc-section">
</ul>
</li>
</ul>
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
<div class="nine columns" id="content">
<div id="tocRoot"></div>
<p class="module-desc"><p>This module implements the core asynchronous engine / dispatcher.</p>
<p>For more information, see the <tt class="docutils literal"><span class="pre"><span class="Identifier">Concepts</span></span></tt> chapter of the guide.</p>
</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="../config.html">../config</a>, <a class="reference external" href="../futures.html">../futures</a>, <a class="reference external" href="../osdefs.html">../osdefs</a>, <a class="reference external" href="../oserrno.html">../oserrno</a>, <a class="reference external" href="../osutils.html">../osutils</a>, <a class="reference external" href="../timer.html">../timer</a>, <a class="reference external" href="asyncmacro.html">asyncmacro</a>, <a class="reference external" href="errors.html">errors</a>, <a class="reference external" href="../selectors2.html">../selectors2</a>
</dl></div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="AsyncCallback">
<dt><pre><a href="asyncengine.html#AsyncCallback"><span class="Identifier">AsyncCallback</span></a> <span class="Other">=</span> <a href="../futures.html#InternalAsyncCallback"><span class="Identifier">InternalAsyncCallback</span></a></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L45"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L45" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncFD">
<dt><pre><a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">cint</span></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L179"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L179" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="PDispatcher">
<dt><pre><a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">PDispatcherBase</span></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L178"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L178" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="TimerCallback">
<dt><pre><a href="asyncengine.html#TimerCallback"><span class="Identifier">TimerCallback</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
<span class="Identifier">finishAt</span><span class="Operator">*</span><span class="Other">:</span> <a href="../timer.html#Moment"><span class="Identifier">Moment</span></a>
<span class="Identifier">function</span><span class="Operator">*</span><span class="Other">:</span> <a href="asyncengine.html#AsyncCallback"><span class="Identifier">AsyncCallback</span></a>
</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L47"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L47" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="TrackerBase">
<dt><pre><a href="asyncengine.html#TrackerBase"><span class="Identifier">TrackerBase</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">RootRef</span>
<span class="Identifier">id</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
<span class="Identifier">dump</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}
<span class="Identifier">isLeaked</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}
</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L51"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L51" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="TrackerCounter">
<dt><pre><a href="asyncengine.html#TrackerCounter"><span class="Identifier">TrackerCounter</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">opened</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">uint64</span>
<span class="Identifier">closed</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">uint64</span>
</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L56"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L56" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
</dl></div>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<div id="MaxEventsCount">
<dt><pre><a href="asyncengine.html#MaxEventsCount"><span class="Identifier">MaxEventsCount</span></a> <span class="Other">=</span> <span class="DecNumber">64</span></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L31"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L31" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
</dl></div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="==,AsyncFD,AsyncFD">
<dt><pre><span class="Keyword">proc</span> <a href="#%3D%3D%2CAsyncFD%2CAsyncFD"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L203"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L203" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addReader2,AsyncFD,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#addReader2%2CAsyncFD%2CCallbackFunc%2Cpointer"><span class="Identifier">addReader2</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span>
<span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L193"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L193" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addTimer,int64,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#addTimer%2Cint64%2CCallbackFunc%2Cpointer"><span class="Identifier">addTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <span class="Identifier">int64</span><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use addTimer(Duration, cb, udata)&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use addTimer(Duration, cb, udata)
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1121"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1121" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addTimer,Moment,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#addTimer%2CMoment%2CCallbackFunc%2Cpointer"><span class="Identifier">addTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <a href="../timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use setTimer/clearTimer instead&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use setTimer/clearTimer instead
</div>
Arrange for the callback <tt class="docutils literal"><span class="pre">cb</span></tt> to be called at the given absolute timestamp <tt class="docutils literal"><span class="pre">at</span></tt>. You can also pass <tt class="docutils literal"><span class="pre">udata</span></tt> to callback.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1115"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1115" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addTimer,uint64,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#addTimer%2Cuint64%2CCallbackFunc%2Cpointer"><span class="Identifier">addTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <span class="Identifier">uint64</span><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use addTimer(Duration, cb, udata)&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use addTimer(Duration, cb, udata)
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1125"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1125" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addTracker,string,T">
<dt><pre><span class="Keyword">proc</span> <a href="#addTracker%2Cstring%2CT"><span class="Identifier">addTracker</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">id</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">tracker</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Please use trackCounter facility instead&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Please use trackCounter facility instead
</div>
Add new <tt class="docutils literal"><span class="pre">tracker</span></tt> object to current thread dispatcher with identifier <tt class="docutils literal"><span class="pre">id</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1212"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1212" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addWriter2,AsyncFD,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#addWriter2%2CAsyncFD%2CCallbackFunc%2Cpointer"><span class="Identifier">addWriter2</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span>
<span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L196"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L196" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="callIdle,InternalAsyncCallback">
<dt><pre><span class="Keyword">proc</span> <a href="#callIdle%2CInternalAsyncCallback"><span class="Identifier">callIdle</span></a><span class="Other">(</span><span class="Identifier">acb</span><span class="Other">:</span> <a href="asyncengine.html#AsyncCallback"><span class="Identifier">AsyncCallback</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Schedule <tt class="docutils literal"><span class="pre">cbproc</span></tt> to be called when there no pending network events available.</p>
<p><strong>WARNING!</strong> Despite the name, &quot;idle&quot; callbacks called on every loop iteration if there no network events available, not when the loop is actually &quot;idle&quot;.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1170"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1170" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="callIdle,CallbackFunc">
<dt><pre><span class="Keyword">proc</span> <a href="#callIdle%2CCallbackFunc"><span class="Identifier">callIdle</span></a><span class="Other">(</span><span class="Identifier">cbproc</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1189"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1189" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="callIdle,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#callIdle%2CCallbackFunc%2Cpointer"><span class="Identifier">callIdle</span></a><span class="Other">(</span><span class="Identifier">cbproc</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">data</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Schedule <tt class="docutils literal"><span class="pre">cbproc</span></tt> to be called when there no pending network events available.</p>
<p><strong>WARNING!</strong> Despite the name, &quot;idle&quot; callbacks called on every loop iteration if there no network events available, not when the loop is actually &quot;idle&quot;.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1179"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1179" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="callSoon,InternalAsyncCallback">
<dt><pre><span class="Keyword">proc</span> <a href="#callSoon%2CInternalAsyncCallback"><span class="Identifier">callSoon</span></a><span class="Other">(</span><span class="Identifier">acb</span><span class="Other">:</span> <a href="asyncengine.html#AsyncCallback"><span class="Identifier">AsyncCallback</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Schedule <tt class="docutils literal"><span class="pre"><span class="Identifier">cbproc</span></span></tt> to be called as soon as possible. The callback is called when control returns to the event loop.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1155"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1155" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="callSoon,CallbackFunc">
<dt><pre><span class="Keyword">proc</span> <a href="#callSoon%2CCallbackFunc"><span class="Identifier">callSoon</span></a><span class="Other">(</span><span class="Identifier">cbproc</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1167"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1167" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="callSoon,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#callSoon%2CCallbackFunc%2Cpointer"><span class="Identifier">callSoon</span></a><span class="Other">(</span><span class="Identifier">cbproc</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">data</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Schedule <tt class="docutils literal"><span class="pre"><span class="Identifier">cbproc</span></span></tt> to be called as soon as possible. The callback is called when control returns to the event loop.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1160"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1160" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="clearTimer,TimerCallback">
<dt><pre><span class="Keyword">proc</span> <a href="#clearTimer%2CTimerCallback"><span class="Identifier">clearTimer</span></a><span class="Other">(</span><span class="Identifier">timer</span><span class="Other">:</span> <a href="asyncengine.html#TimerCallback"><span class="Identifier">TimerCallback</span></a><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1112"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1112" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="closeHandle,AsyncFD,CallbackFunc">
<dt><pre><span class="Keyword">proc</span> <a href="#closeHandle%2CAsyncFD%2CCallbackFunc"><span class="Identifier">closeHandle</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">;</span> <span class="Identifier">aftercb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L199"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L199" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="closeSocket,AsyncFD,CallbackFunc">
<dt><pre><span class="Keyword">proc</span> <a href="#closeSocket%2CAsyncFD%2CCallbackFunc"><span class="Identifier">closeSocket</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">;</span> <span class="Identifier">aftercb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L200"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L200" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="getAsyncTimestamp,Duration">
<dt><pre><span class="Keyword">func</span> <a href="#getAsyncTimestamp%2CDuration"><span class="Identifier">getAsyncTimestamp</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="../timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">auto</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Return rounded up value of duration with milliseconds resolution.</p>
<p>This function also take care on int32 overflow, because Linux and Windows accepts signed 32bit integer as timeout.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L81"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L81" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="getGlobalDispatcher">
<dt><pre><span class="Keyword">proc</span> <a href="#getGlobalDispatcher"><span class="Identifier">getGlobalDispatcher</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span>
<span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use getThreadDispatcher() instead&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use getThreadDispatcher() instead
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1099"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1099" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="getThreadDispatcher">
<dt><pre><span class="Keyword">proc</span> <a href="#getThreadDispatcher"><span class="Identifier">getThreadDispatcher</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns current thread's dispatcher instance.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1089"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1089" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="getTracker,string">
<dt><pre><span class="Keyword">proc</span> <a href="#getTracker%2Cstring"><span class="Identifier">getTracker</span></a><span class="Other">(</span><span class="Identifier">id</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncengine.html#TrackerBase"><span class="Identifier">TrackerBase</span></a> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Please use getTrackerCounter() instead&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Please use getTrackerCounter() instead
</div>
Get <tt class="docutils literal"><span class="pre">tracker</span></tt> from current thread dispatcher using identifier <tt class="docutils literal"><span class="pre">id</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1218"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1218" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="getTrackerCounter,string">
<dt><pre><span class="Keyword">proc</span> <a href="#getTrackerCounter%2Cstring"><span class="Identifier">getTrackerCounter</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncengine.html#TrackerCounter"><span class="Identifier">TrackerCounter</span></a> {.<span class="Identifier">noinit</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Return value of counter with name <tt class="docutils literal"><span class="pre">name</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1233"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1233" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="internalCallTick,InternalAsyncCallback">
<dt><pre><span class="Keyword">proc</span> <a href="#internalCallTick%2CInternalAsyncCallback"><span class="Identifier">internalCallTick</span></a><span class="Other">(</span><span class="Identifier">acb</span><span class="Other">:</span> <a href="asyncengine.html#AsyncCallback"><span class="Identifier">AsyncCallback</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Schedule <tt class="docutils literal"><span class="pre">cbproc</span></tt> to be called after all scheduled callbacks, but only when OS system queue finished processing events.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1192"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1192" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="internalCallTick,CallbackFunc">
<dt><pre><span class="Keyword">proc</span> <a href="#internalCallTick%2CCallbackFunc"><span class="Identifier">internalCallTick</span></a><span class="Other">(</span><span class="Identifier">cbproc</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1203"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1203" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="internalCallTick,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#internalCallTick%2CCallbackFunc%2Cpointer"><span class="Identifier">internalCallTick</span></a><span class="Other">(</span><span class="Identifier">cbproc</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">data</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Schedule <tt class="docutils literal"><span class="pre">cbproc</span></tt> to be called after all scheduled callbacks when OS system queue processing is done.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1197"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1197" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="isCounterLeaked,string">
<dt><pre><span class="Keyword">proc</span> <a href="#isCounterLeaked%2Cstring"><span class="Identifier">isCounterLeaked</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">noinit</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if leak is detected, number of <tt class="docutils literal"><span class="pre"><span class="Identifier">opened</span></span></tt> not equal to number of <tt class="docutils literal"><span class="pre"><span class="Identifier">closed</span></span></tt> requests.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1238"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1238" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="newDispatcher">
<dt><pre><span class="Keyword">proc</span> <a href="#newDispatcher"><span class="Identifier">newDispatcher</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L183"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L183" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="poll">
<dt><pre><span class="Keyword">proc</span> <a href="#poll"><span class="Identifier">poll</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Perform single asynchronous step, processing timers and completing tasks. Blocks until at least one event has completed.</p>
<p>Exceptions raised during <tt class="docutils literal"><span class="pre"><span class="Identifier">async</span></span></tt> task exection are stored as outcome in the corresponding <tt class="docutils literal"><span class="pre"><span class="Identifier">Future</span></span></tt> - <tt class="docutils literal"><span class="pre"><span class="Identifier">poll</span></span></tt> itself does not raise.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L184"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L184" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="raiseAsDefect,ref.Exception,string">
<dt><pre><span class="Keyword">proc</span> <a href="#raiseAsDefect%2Cref.Exception%2Cstring"><span class="Identifier">raiseAsDefect</span></a><span class="Other">(</span><span class="Identifier">exc</span><span class="Other">:</span> <span class="Keyword">ref</span> <span class="Identifier">Exception</span><span class="Other">;</span> <span class="Identifier">msg</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> {.<span class="Identifier">noreturn</span><span class="Other">,</span> <span class="Identifier">noinline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L152"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L152" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="raiseOsDefect,OSErrorCode,string">
<dt><pre><span class="Keyword">proc</span> <a href="#raiseOsDefect%2COSErrorCode%2Cstring"><span class="Identifier">raiseOsDefect</span></a><span class="Other">(</span><span class="Identifier">error</span><span class="Other">:</span> <span class="Identifier">OSErrorCode</span><span class="Other">;</span> <span class="Identifier">msg</span> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span><span class="Other">)</span> {.<span class="Identifier">noreturn</span><span class="Other">,</span> <span class="Identifier">noinline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L159"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L159" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="register2,AsyncFD">
<dt><pre><span class="Keyword">proc</span> <a href="#register2%2CAsyncFD"><span class="Identifier">register2</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L191"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L191" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="removeReader2,AsyncFD">
<dt><pre><span class="Keyword">proc</span> <a href="#removeReader2%2CAsyncFD"><span class="Identifier">removeReader2</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L195"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L195" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="removeTimer,int64,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#removeTimer%2Cint64%2CCallbackFunc%2Cpointer"><span class="Identifier">removeTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <span class="Identifier">int64</span><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use removeTimer(Duration, cb, udata)&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use removeTimer(Duration, cb, udata)
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1147"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1147" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="removeTimer,Moment,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#removeTimer%2CMoment%2CCallbackFunc%2Cpointer"><span class="Identifier">removeTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <a href="../timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Remove timer callback <tt class="docutils literal"><span class="pre">cb</span></tt> with absolute timestamp <tt class="docutils literal"><span class="pre">at</span></tt> from waiting queue.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1129"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1129" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="removeTimer,uint64,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#removeTimer%2Cuint64%2CCallbackFunc%2Cpointer"><span class="Identifier">removeTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <span class="Identifier">uint64</span><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span>
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use removeTimer(Duration, cb, udata)&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use removeTimer(Duration, cb, udata)
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1151"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1151" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="removeWriter2,AsyncFD">
<dt><pre><span class="Keyword">proc</span> <a href="#removeWriter2%2CAsyncFD"><span class="Identifier">removeWriter2</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L198"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L198" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="runForever">
<dt><pre><span class="Keyword">proc</span> <a href="#runForever"><span class="Identifier">runForever</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Begins a never ending global dispatcher poll loop. Raises different exceptions depending on the platform.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1206"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1206" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="setGlobalDispatcher,PDispatcher">
<dt><pre><span class="Keyword">proc</span> <a href="#setGlobalDispatcher%2CPDispatcher"><span class="Identifier">setGlobalDispatcher</span></a><span class="Other">(</span><span class="Identifier">disp</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span>
<span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;Use setThreadDispatcher() instead&quot;</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<div class="deprecation-message">
<b>Deprecated:</b> Use setThreadDispatcher() instead
</div>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1095"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1095" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="setThreadDispatcher,PDispatcher">
<dt><pre><span class="Keyword">proc</span> <a href="#setThreadDispatcher%2CPDispatcher"><span class="Identifier">setThreadDispatcher</span></a><span class="Other">(</span><span class="Identifier">disp</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Set current thread's dispatcher instance to <tt class="docutils literal"><span class="pre">disp</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1083"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1083" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="setTimer,Moment,CallbackFunc,pointer">
<dt><pre><span class="Keyword">proc</span> <a href="#setTimer%2CMoment%2CCallbackFunc%2Cpointer"><span class="Identifier">setTimer</span></a><span class="Other">(</span><span class="Identifier">at</span><span class="Other">:</span> <a href="../timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">cb</span><span class="Other">:</span> <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncengine.html#TimerCallback"><span class="Identifier">TimerCallback</span></a> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Arrange for the callback <tt class="docutils literal"><span class="pre">cb</span></tt> to be called at the given absolute timestamp <tt class="docutils literal"><span class="pre">at</span></tt>. You can also pass <tt class="docutils literal"><span class="pre">udata</span></tt> to callback.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1103"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1103" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="toException,OSErrorCode">
<dt><pre><span class="Keyword">func</span> <a href="#toException%2COSErrorCode"><span class="Identifier">toException</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <span class="Identifier">OSErrorCode</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ref</span> <span class="Identifier">OSError</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L172"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L172" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="trackCounter,string">
<dt><pre><span class="Keyword">proc</span> <a href="#trackCounter%2Cstring"><span class="Identifier">trackCounter</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> {.<span class="Identifier">noinit</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Increase tracker counter with name <tt class="docutils literal"><span class="pre">name</span></tt> by 1.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1223"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1223" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="unregister2,AsyncFD">
<dt><pre><span class="Keyword">proc</span> <a href="#unregister2%2CAsyncFD"><span class="Identifier">unregister2</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L192"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L192" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="unregisterAndCloseFd,AsyncFD">
<dt><pre><span class="Keyword">proc</span> <a href="#unregisterAndCloseFd%2CAsyncFD"><span class="Identifier">unregisterAndCloseFd</span></a><span class="Other">(</span><span class="Identifier">fd</span><span class="Other">:</span> <a href="asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L201"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L201" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="untrackCounter,string">
<dt><pre><span class="Keyword">proc</span> <a href="#untrackCounter%2Cstring"><span class="Identifier">untrackCounter</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> {.<span class="Identifier">noinit</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Decrease tracker counter with name <tt class="docutils literal"><span class="pre">name</span></tt> by 1.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1228"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1228" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
</dl></div>
<div class="section" id="15">
<h1><a class="toc-backref" href="#15">Iterators</a></h1>
<dl class="item">
<div id="trackerCounterKeys.i,PDispatcher">
<dt><pre><span class="Keyword">iterator</span> <a href="#trackerCounterKeys.i%2CPDispatcher"><span class="Identifier">trackerCounterKeys</span></a><span class="Other">(</span><span class="Identifier">loop</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1254"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1254" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="trackerCounters.i,PDispatcher">
<dt><pre><span class="Keyword">iterator</span> <a href="#trackerCounters.i%2CPDispatcher"><span class="Identifier">trackerCounters</span></a><span class="Other">(</span><span class="Identifier">loop</span><span class="Other">:</span> <a href="asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">,</span>
<span class="Identifier">value</span><span class="Other">:</span> <a href="asyncengine.html#TrackerCounter"><span class="Identifier">TrackerCounter</span></a><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Iterates over <tt class="docutils literal"><span class="pre"><span class="Identifier">loop</span></span></tt> thread dispatcher tracker counter table, returns all the tracker counter's names and values.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/internal/asyncengine.nim#L1245"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/internal/asyncengine.nim#L1245" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
</dl></div>
<div class="section" id="19">
<h1><a class="toc-backref" href="#19">Exports</a></h1>
<dl class="item">
<a href="errors.html#AsyncExceptionError"><span class="Identifier">AsyncExceptionError</span></a>, <a href="errors.html#AsyncError"><span class="Identifier">AsyncError</span></a>, <a href="errors.html#AsyncTimeoutError"><span class="Identifier">AsyncTimeoutError</span></a>, <a href="../futures.html#state,FutureBase"><span class="Identifier">state</span></a>, <a href="../futures.html#LocationKind"><span class="Identifier">LocationKind</span></a>, <a href="../futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a>, <a href="../futures.html#error,FutureBase"><span class="Identifier">error</span></a>, <a href="../futures.html#id.t,FutureBase"><span class="Identifier">id</span></a>, <a href="../futures.html#CancelledError"><span class="Identifier">CancelledError</span></a>, <a href="../futures.html#completed.t,typeFuture,static[string]"><span class="Identifier">completed</span></a>, <a href="../futures.html#value,Future[void]"><span class="Identifier">value</span></a>, <a href="../futures.html#FutureFlags"><span class="Identifier">FutureFlags</span></a>, <a href="../futures.html#failed,FutureBase"><span class="Identifier">failed</span></a>, <a href="../futures.html#Future"><span class="Identifier">Future</span></a>, <a href="../futures.html#failed.t,typeFuture[T],ref.CatchableError,static[string]"><span class="Identifier">failed</span></a>, <a href="../srcloc.html#$,ptr.SrcLoc"><span class="Identifier">$</span></a>, <a href="../futures.html#InternalFutureBase"><span class="Identifier">InternalFutureBase</span></a>, <a href="../futures.html#completed,FutureBase"><span class="Identifier">completed</span></a>, <a href="../futures.html#cancelled,FutureBase"><span class="Identifier">cancelled</span></a>, <a href="../futures.html#init.t,typeFuture[T],static[string],static[FutureFlags]"><span class="Identifier">init</span></a>, <a href="../futures.html#InternalAsyncCallback"><span class="Identifier">InternalAsyncCallback</span></a>, <a href="../futures.html#internalInitFutureBase,FutureBase,ptr.SrcLoc,FutureState,FutureFlags"><span class="Identifier">internalInitFutureBase</span></a>, <a href="../futures.html#FutureBase"><span class="Identifier">FutureBase</span></a>, <a href="../futures.html#value,Future[T: not void]"><span class="Identifier">value</span></a>, <a href="../futures.html#finished,FutureBase"><span class="Identifier">finished</span></a>, <a href="../srcloc.html#getSrcLocation.t,staticstring"><span class="Identifier">getSrcLocation</span></a>, <a href="../futures.html#FutureError"><span class="Identifier">FutureError</span></a>, <a href="../futures.html#FutureState"><span class="Identifier">FutureState</span></a>, <a href="../futures.html#init.t,typeFuture[T],static[string]"><span class="Identifier">init</span></a>, <a href="../futures.html#location,FutureBase"><span class="Identifier">location</span></a>, <a href="../futures.html#flags,FutureBase"><span class="Identifier">flags</span></a>, <a href="../futures.html#FutureFlag"><span class="Identifier">FutureFlag</span></a>, <a href="../srcloc.html#SrcLoc"><span class="Identifier">SrcLoc</span></a>, <a href="../futures.html#FutureDefect"><span class="Identifier">FutureDefect</span></a>, <a href="../futures.html#completed.t,typeFuture,T,static[string]"><span class="Identifier">completed</span></a>, <a href="../timer.html#Hour"><span class="Identifier">Hour</span></a>, <a href="../timer.html#init,typedesc[Moment],int64,Duration"><span class="Identifier">init</span></a>, <a href="../timer.html#fromNow,typedesc[Moment],Duration"><span class="Identifier">fromNow</span></a>, <a href="../timer.html#milliseconds,SomeIntegerI64"><span class="Identifier">milliseconds</span></a>, <a href="../timer.html#<,Moment,Moment"><span class="Identifier">&lt;</span></a>, <a href="../timer.html#fastEpochTime"><span class="Identifier">fastEpochTime</span></a>, <a href="../timer.html#Minute"><span class="Identifier">Minute</span></a>, <a href="../timer.html#secs,SomeIntegerI64"><span class="Identifier">secs</span></a>, <a href="../timer.html#Day"><span class="Identifier">Day</span></a>, <a href="../timer.html#micros,Duration"><span class="Identifier">micros</span></a>, <a href="../timer.html#>=,Duration,Duration"><span class="Identifier">&gt;=</span></a>, <a href="../timer.html#==,Moment,Moment"><span class="Identifier">==</span></a>, <a href="../timer.html#nanoseconds,Duration"><span class="Identifier">nanoseconds</span></a>, <a href="../timer.html#+,Duration,Duration"><span class="Identifier">+</span></a>, <a href="../timer.html#>=,Moment,Moment"><span class="Identifier">&gt;=</span></a>, <a href="../timer.html#nanos,Duration"><span class="Identifier">nanos</span></a>, <a href="../timer.html#minutes,Duration"><span class="Identifier">minutes</span></a>, <a href="../timer.html#<=,Moment,Moment"><span class="Identifier">&lt;=</span></a>, <a href="../timer.html#low.t,typedesc[Moment]"><span class="Identifier">low</span></a>, <a href="../timer.html#milliseconds,Duration"><span class="Identifier">milliseconds</span></a>, <a href="../timer.html#millis,Duration"><span class="Identifier">millis</span></a>, <a href="../timer.html#$,Duration"><span class="Identifier">$</span></a>, <a href="../timer.html#micros,SomeIntegerI64"><span class="Identifier">micros</span></a>, <a href="../timer.html#asyncTimer"><span class="Identifier">asyncTimer</span></a>, <a href="../timer.html#+=,Moment,Duration"><span class="Identifier">+=</span></a>, <a href="../timer.html#Nanosecond"><span class="Identifier">Nanosecond</span></a>, <a href="../timer.html#-,Moment,Moment"><span class="Identifier">-</span></a>, <a href="../timer.html#-,Moment,Duration"><span class="Identifier">-</span></a>, <a href="../timer.html#Second"><span class="Identifier">Second</span></a>, <a href="../timer.html#>,Moment,Moment"><span class="Identifier">&gt;</span></a>, <a href="../timer.html#high.t,typedesc[Duration]"><span class="Identifier">high</span></a>, <a href="../timer.html#epochNanoSeconds,Moment"><span class="Identifier">epochNanoSeconds</span></a>, <a href="../timer.html#Microsecond"><span class="Identifier">Microsecond</span></a>, <a href="../timer.html#weeks,SomeIntegerI64"><span class="Identifier">weeks</span></a>, <a href="../timer.html#microseconds,Duration"><span class="Identifier">microseconds</span></a>, <a href="../timer.html#secs,Duration"><span class="Identifier">secs</span></a>, <a href="../timer.html#InfiniteDuration"><span class="Identifier">InfiniteDuration</span></a>, <a href="../timer.html#-=,Moment,Duration"><span class="Identifier">-=</span></a>, <a href="../timer.html#+,Duration,Moment"><span class="Identifier">+</span></a>, <a href="../timer.html#minutes,SomeIntegerI64"><span class="Identifier">minutes</span></a>, <a href="../timer.html#+=,Duration,Duration"><span class="Identifier">+=</span></a>, <a href="../timer.html#microseconds,SomeIntegerI64"><span class="Identifier">microseconds</span></a>, <a href="../timer.html#$,Moment"><span class="Identifier">$</span></a>, <a href="../timer.html#hours,SomeIntegerI64"><span class="Identifier">hours</span></a>, <a href="../timer.html#toString"><span class="Identifier">toString</span></a>, <a href="../timer.html#hours,Duration"><span class="Identifier">hours</span></a>, <a href="../timer.html#Duration"><span class="Identifier">Duration</span></a>, <a href="../timer.html#now,typedesc[Moment]"><span class="Identifier">now</span></a>, <a href="../timer.html#<,Duration,Duration"><span class="Identifier">&lt;</span></a>, <a href="../timer.html#weeks,Duration"><span class="Identifier">weeks</span></a>, <a href="../timer.html#Millisecond"><span class="Identifier">Millisecond</span></a>, <a href="../timer.html#<=,Duration,Duration"><span class="Identifier">&lt;=</span></a>, <a href="../timer.html#millis,SomeIntegerI64"><span class="Identifier">millis</span></a>, <a href="../timer.html#>,Duration,Duration"><span class="Identifier">&gt;</span></a>, <a href="../timer.html#==,Duration,Duration"><span class="Identifier">==</span></a>, <a href="../timer.html#seconds,Duration"><span class="Identifier">seconds</span></a>, <a href="../timer.html#isZero,Duration"><span class="Identifier">isZero</span></a>, <a href="../timer.html#ZeroDuration"><span class="Identifier">ZeroDuration</span></a>, <a href="../timer.html#isInfinite,Duration"><span class="Identifier">isInfinite</span></a>, <a href="../timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a>, <a href="../timer.html#div,Duration,SomeIntegerI64"><span class="Identifier">div</span></a>, <a href="../timer.html#+,Moment,Duration"><span class="Identifier">+</span></a>, <a href="../timer.html#*,SomeIntegerI64,Duration"><span class="Identifier">*</span></a>, <a href="../timer.html#epochSeconds,Moment"><span class="Identifier">epochSeconds</span></a>, <a href="../timer.html#high.t,typedesc[Moment]"><span class="Identifier">high</span></a>, <a href="../timer.html#nanoseconds,SomeIntegerI64"><span class="Identifier">nanoseconds</span></a>, <a href="../timer.html#nanos,SomeIntegerI64"><span class="Identifier">nanos</span></a>, <a href="../timer.html#low.t,typedesc[Duration]"><span class="Identifier">low</span></a>, <a href="../timer.html#-,Duration,Duration"><span class="Identifier">-</span></a>, <a href="../timer.html#days,SomeIntegerI64"><span class="Identifier">days</span></a>, <a href="../timer.html#-=,Duration,Duration"><span class="Identifier">-=</span></a>, <a href="../timer.html#Week"><span class="Identifier">Week</span></a>, <a href="../timer.html#days,Duration"><span class="Identifier">days</span></a>, <a href="../timer.html#seconds,SomeIntegerI64"><span class="Identifier">seconds</span></a>, <a href="../timer.html#*,Duration,SomeIntegerI64"><span class="Identifier">*</span></a>, <a href="../timer.html#Moment"><span class="Identifier">Moment</span></a>, <a href="asyncmacro.html#async.m,untyped,untyped"><span class="Identifier">async</span></a>, <a href="asyncmacro.html#async.m,untyped"><span class="Identifier">async</span></a>, <a href="asyncmacro.html#await.t,Future[T]"><span class="Identifier">await</span></a>, <a href="asyncmacro.html#await.t,InternalRaisesFuture[T,E]"><span class="Identifier">await</span></a>, <a href="asyncmacro.html#awaitne.t,Future[T]"><span class="Identifier">awaitne</span></a>, <a href="../oserrno.html#EPERM"><span class="Identifier">EPERM</span></a>, <a href="../oserrno.html#ENOBUFS"><span class="Identifier">ENOBUFS</span></a>, <a href="../oserrno.html#EFAULT"><span class="Identifier">EFAULT</span></a>, <a href="../oserrno.html#EKEYREJECTED"><span class="Identifier">EKEYREJECTED</span></a>, <a href="../oserrno.html#EHWPOISON"><span class="Identifier">EHWPOISON</span></a>, <a href="../oserrno.html#EHOSTDOWN"><span class="Identifier">EHOSTDOWN</span></a>, <a href="../oserrno.html#EDQUOT"><span class="Identifier">EDQUOT</span></a>, <a href="../oserrno.html#EREMCHG"><span class="Identifier">EREMCHG</span></a>, <a href="../oserrno.html#EISDIR"><span class="Identifier">EISDIR</span></a>, <a href="../oserrno.html#ESTRPIPE"><span class="Identifier">ESTRPIPE</span></a>, <a href="../oserrno.html#EMLINK"><span class="Identifier">EMLINK</span></a>, <a href="../oserrno.html#ENXIO"><span class="Identifier">ENXIO</span></a>, <a href="../oserrno.html#ETOOMANYREFS"><span class="Identifier">ETOOMANYREFS</span></a>, <a href="../oserrno.html#ENOMEDIUM"><span class="Identifier">ENOMEDIUM</span></a>, <a href="../oserrno.html#EOVERFLOW"><span class="Identifier">EOVERFLOW</span></a>, <a href="../oserrno.html#EAFNOSUPPORT"><span class="Identifier">EAFNOSUPPORT</span></a>, <a href="../oserrno.html#ENOTCONN"><span class="Identifier">ENOTCONN</span></a>, <a href="../oserrno.html#ECHILD"><span class="Identifier">ECHILD</span></a>, <a href="../oserrno.html#ESOCKTNOSUPPORT"><span class="Identifier">ESOCKTNOSUPPORT</span></a>, <a href="../oserrno.html#EBFONT"><span class="Identifier">EBFONT</span></a>, <a href="../oserrno.html#ESRMNT"><span class="Identifier">ESRMNT</span></a>, <a href="../oserrno.html#ENOTEMPTY"><span class="Identifier">ENOTEMPTY</span></a>, <a href="../oserrno.html#ESTALE"><span class="Identifier">ESTALE</span></a>, <a href="../oserrno.html#EPROTO"><span class="Identifier">EPROTO</span></a>, <a href="../oserrno.html#EADDRNOTAVAIL"><span class="Identifier">EADDRNOTAVAIL</span></a>, <a href="../oserrno.html#EXDEV"><span class="Identifier">EXDEV</span></a>, <a href="../oserrno.html#EBADF"><span class="Identifier">EBADF</span></a>, <a href="../oserrno.html#EKEYREVOKED"><span class="Identifier">EKEYREVOKED</span></a>, <a href="../oserrno.html#ENOTDIR"><span class="Identifier">ENOTDIR</span></a>, <a href="../oserrno.html#EDEADLK"><span class="Identifier">EDEADLK</span></a>, <a href="../oserrno.html#EALREADY"><span class="Identifier">EALREADY</span></a>, <a href="../oserrno.html#ESPIPE"><span class="Identifier">ESPIPE</span></a>, <a href="../oserrno.html#ENOEXEC"><span class="Identifier">ENOEXEC</span></a>, <a href="../oserrno.html#ENETDOWN"><span class="Identifier">ENETDOWN</span></a>, <a href="../oserrno.html#EACCES"><span class="Identifier">EACCES</span></a>, <a href="../oserrno.html#ELNRNG"><span class="Identifier">ELNRNG</span></a>, <a href="../oserrno.html#ELOOP"><span class="Identifier">ELOOP</span></a>, <a href="../oserrno.html#ENODEV"><span class="Identifier">ENODEV</span></a>, <a href="../oserrno.html#ENFILE"><span class="Identifier">ENFILE</span></a>, <a href="../oserrno.html#ENOPKG"><span class="Identifier">ENOPKG</span></a>, <a href="../oserrno.html#ENOCSI"><span class="Identifier">ENOCSI</span></a>, <a href="../oserrno.html#ECHRNG"><span class="Identifier">ECHRNG</span></a>, <a href="../oserrno.html#EL3HLT"><span class="Identifier">EL3HLT</span></a>, <a href="../oserrno.html#EINVAL"><span class="Identifier">EINVAL</span></a>, <a href="../oserrno.html#EADDRINUSE"><span class="Identifier">EADDRINUSE</span></a>, <a href="../oserrno.html#EUNATCH"><span class="Identifier">EUNATCH</span></a>, <a href="../oserrno.html#EBADFD"><span class="Identifier">EBADFD</span></a>, <a href="../oserrno.html#EMEDIUMTYPE"><span class="Identifier">EMEDIUMTYPE</span></a>, <a href="../oserrno.html#ERESTART"><span class="Identifier">ERESTART</span></a>, <a href="../oserrno.html#ESRCH"><span class="Identifier">ESRCH</span></a>, <a href="../oserrno.html#ETXTBSY"><span class="Identifier">ETXTBSY</span></a>, <a href="../oserrno.html#ENETUNREACH"><span class="Identifier">ENETUNREACH</span></a>, <a href="../oserrno.html#EPROTONOSUPPORT"><span class="Identifier">EPROTONOSUPPORT</span></a>, <a href="../oserrno.html#ECANCELED"><span class="Identifier">ECANCELED</span></a>, <a href="../oserrno.html#EBADMSG"><span class="Identifier">EBADMSG</span></a>, <a href="../oserrno.html#EMFILE"><span class="Identifier">EMFILE</span></a>, <a href="../oserrno.html#ENOSYS"><span class="Identifier">ENOSYS</span></a>, <a href="../oserrno.html#ERANGE"><span class="Identifier">ERANGE</span></a>, <a href="../oserrno.html#EDEADLOCK"><span class="Identifier">EDEADLOCK</span></a>, <a href="../oserrno.html#ENOKEY"><span class="Identifier">ENOKEY</span></a>, <a href="../oserrno.html#EILSEQ"><span class="Identifier">EILSEQ</span></a>, <a href="../oserrno.html#EBUSY"><span class="Identifier">EBUSY</span></a>, <a href="../oserrno.html#EROFS"><span class="Identifier">EROFS</span></a>, <a href="../oserrno.html#ENOTSOCK"><span class="Identifier">ENOTSOCK</span></a>, <a href="../oserrno.html#ECONNREFUSED"><span class="Identifier">ECONNREFUSED</span></a>, <a href="../oserrno.html#ELIBMAX"><span class="Identifier">ELIBMAX</span></a>, <a href="../oserrno.html#EBADRQC"><span class="Identifier">EBADRQC</span></a>, <a href="../oserrno.html#ECOMM"><span class="Identifier">ECOMM</span></a>, <a href="../oserrno.html#EL2HLT"><span class="Identifier">EL2HLT</span></a>, <a href="../oserrno.html#EIDRM"><span class="Identifier">EIDRM</span></a>, <a href="../oserrno.html#ENOTBLK"><span class="Identifier">ENOTBLK</span></a>, <a href="../oserrno.html#ENOTTY"><span class="Identifier">ENOTTY</span></a>, <a href="../oserrno.html#EOPNOTSUPP"><span class="Identifier">EOPNOTSUPP</span></a>, <a href="../oserrno.html#EISNAM"><span class="Identifier">EISNAM</span></a>, <a href="../oserrno.html#ENOSR"><span class="Identifier">ENOSR</span></a>, <a href="../oserrno.html#EXFULL"><span class="Identifier">EXFULL</span></a>, <a href="../oserrno.html#EPROTOTYPE"><span class="Identifier">EPROTOTYPE</span></a>, <a href="../oserrno.html#EUCLEAN"><span class="Identifier">EUCLEAN</span></a>, <a href="../oserrno.html#ENOSTR"><span class="Identifier">ENOSTR</span></a>, <a href="../oserrno.html#ENOTRECOVERABLE"><span class="Identifier">ENOTRECOVERABLE</span></a>, <a href="../oserrno.html#ENOANO"><span class="Identifier">ENOANO</span></a>, <a href="../oserrno.html#ERFKILL"><span class="Identifier">ERFKILL</span></a>, <a href="../oserrno.html#ENOENT"><span class="Identifier">ENOENT</span></a>, <a href="../oserrno.html#EISCONN"><span class="Identifier">EISCONN</span></a>, <a href="../oserrno.html#ELIBEXEC"><span class="Identifier">ELIBEXEC</span></a>, <a href="../oserrno.html#EMULTIHOP"><span class="Identifier">EMULTIHOP</span></a>, <a href="../oserrno.html#ELIBACC"><span class="Identifier">ELIBACC</span></a>, <a href="../oserrno.html#ENOLCK"><span class="Identifier">ENOLCK</span></a>, <a href="../oserrno.html#EHOSTUNREACH"><span class="Identifier">EHOSTUNREACH</span></a>, <a href="../oserrno.html#ENETRESET"><span class="Identifier">ENETRESET</span></a>, <a href="../oserrno.html#ECONNRESET"><span class="Identifier">ECONNRESET</span></a>, <a href="../oserrno.html#EINPROGRESS"><span class="Identifier">EINPROGRESS</span></a>, <a href="../oserrno.html#E2BIG"><span class="Identifier">E2BIG</span></a>, <a href="../oserrno.html#EIO"><span class="Identifier">EIO</span></a>, <a href="../oserrno.html#ENODATA"><span class="Identifier">ENODATA</span></a>, <a href="../oserrno.html#ESHUTDOWN"><span class="Identifier">ESHUTDOWN</span></a>, <a href="../oserrno.html#EFBIG"><span class="Identifier">EFBIG</span></a>, <a href="../oserrno.html#ELIBBAD"><span class="Identifier">ELIBBAD</span></a>, <a href="../oserrno.html#EOWNERDEAD"><span class="Identifier">EOWNERDEAD</span></a>, <a href="../oserrno.html#ETIMEDOUT"><span class="Identifier">ETIMEDOUT</span></a>, <a href="../oserrno.html#ECONNABORTED"><span class="Identifier">ECONNABORTED</span></a>, <a href="../oserrno.html#ENOSPC"><span class="Identifier">ENOSPC</span></a>, <a href="../oserrno.html#EBADSLT"><span class="Identifier">EBADSLT</span></a>, <a href="../oserrno.html#ETIME"><span class="Identifier">ETIME</span></a>, <a href="../oserrno.html#EINTR"><span class="Identifier">EINTR</span></a>, <a href="../oserrno.html#EEXIST"><span class="Identifier">EEXIST</span></a>, <a href="../oserrno.html#ENONET"><span class="Identifier">ENONET</span></a>, <a href="../oserrno.html#EREMOTEIO"><span class="Identifier">EREMOTEIO</span></a>, <a href="../oserrno.html#EPFNOSUPPORT"><span class="Identifier">EPFNOSUPPORT</span></a>, <a href="../oserrno.html#ENOLINK"><span class="Identifier">ENOLINK</span></a>, <a href="../oserrno.html#ENOMSG"><span class="Identifier">ENOMSG</span></a>, <a href="../oserrno.html#EDOM"><span class="Identifier">EDOM</span></a>, <a href="../oserrno.html#EMSGSIZE"><span class="Identifier">EMSGSIZE</span></a>, <a href="../oserrno.html#EPIPE"><span class="Identifier">EPIPE</span></a>, <a href="../oserrno.html#EBADE"><span class="Identifier">EBADE</span></a>, <a href="../oserrno.html#ENOMEM"><span class="Identifier">ENOMEM</span></a>, <a href="../oserrno.html#ELIBSCN"><span class="Identifier">ELIBSCN</span></a>, <a href="../oserrno.html#ENOPROTOOPT"><span class="Identifier">ENOPROTOOPT</span></a>, <a href="../oserrno.html#EDESTADDRREQ"><span class="Identifier">EDESTADDRREQ</span></a>, <a href="../oserrno.html#ENAVAIL"><span class="Identifier">ENAVAIL</span></a>, <a href="../oserrno.html#ENOTNAM"><span class="Identifier">ENOTNAM</span></a>, <a href="../oserrno.html#EADV"><span class="Identifier">EADV</span></a>, <a href="../oserrno.html#EDOTDOT"><span class="Identifier">EDOTDOT</span></a>, <a href="../oserrno.html#EUSERS"><span class="Identifier">EUSERS</span></a>, <a href="../oserrno.html#EKEYEXPIRED"><span class="Identifier">EKEYEXPIRED</span></a>, <a href="../oserrno.html#EBADR"><span class="Identifier">EBADR</span></a>, <a href="../oserrno.html#EL3RST"><span class="Identifier">EL3RST</span></a>, <a href="../oserrno.html#EAGAIN"><span class="Identifier">EAGAIN</span></a>, <a href="../oserrno.html#ENOTUNIQ"><span class="Identifier">ENOTUNIQ</span></a>, <a href="../oserrno.html#EWOULDBLOCK"><span class="Identifier">EWOULDBLOCK</span></a>, <a href="../oserrno.html#ENAMETOOLONG"><span class="Identifier">ENAMETOOLONG</span></a>, <a href="../oserrno.html#EREMOTE"><span class="Identifier">EREMOTE</span></a>, <a href="../oserrno.html#EL2NSYNC"><span class="Identifier">EL2NSYNC</span></a>
</dl></div>
</div>
</div>
<div class="row">
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-11-28 08:22:46 UTC</small>
</div>
</div>
</div>
</div>
</body>
</html>