nim-chronos/api/chronos/asyncsync.html

1192 lines
141 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/asyncsync</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/asyncsync</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="#AsyncEvent"
title="AsyncEvent = ref object of RootRef
flag: bool
waiters: seq[Future[void].Raising([CancelledError])]">AsyncEvent</a></li>
<li><a class="reference" href="#AsyncEventQueue"
title="AsyncEventQueue[T] = ref object of RootObj
readers: seq[EventQueueReader]
queue: Deque[T]
counter: uint64
limit: int
offset: int">AsyncEventQueue</a></li>
<li><a class="reference" href="#AsyncEventQueueFullError"
title="AsyncEventQueueFullError = object of AsyncError">AsyncEventQueueFullError</a></li>
<li><a class="reference" href="#AsyncLock"
title="AsyncLock = ref object of RootRef
locked: bool
acquired: bool
waiters: seq[Future[void].Raising([CancelledError])]">AsyncLock</a></li>
<li><a class="reference" href="#AsyncLockError"
title="AsyncLockError = object of AsyncError">AsyncLockError</a></li>
<li><a class="reference" href="#AsyncQueue"
title="AsyncQueue[T] = ref object of RootRef
getters: seq[Future[void].Raising([CancelledError])]
putters: seq[Future[void].Raising([CancelledError])]
queue: Deque[T]
maxsize: int">AsyncQueue</a></li>
<li><a class="reference" href="#AsyncQueueEmptyError"
title="AsyncQueueEmptyError = object of AsyncError">AsyncQueueEmptyError</a></li>
<li><a class="reference" href="#AsyncQueueFullError"
title="AsyncQueueFullError = object of AsyncError">AsyncQueueFullError</a></li>
<li><a class="reference" href="#EventQueueKey"
title="EventQueueKey = distinct uint64">EventQueueKey</a></li>
<li><a class="reference" href="#EventQueueReader"
title="EventQueueReader = object
key: EventQueueKey
offset: int
waiter: Future[void].Raising([CancelledError])
overflow: bool">EventQueueReader</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="#%24%2CAsyncQueue%5BT%5D"
title="`$`[T](aq: AsyncQueue[T]): string">`$`[T](aq: AsyncQueue[T]): string</a></li>
</ul>
<ul class="simple nested-toc-section">[]
<li><a class="reference" href="#%5B%5D%2CAsyncQueue%5BT%5D%2CBackwardsIndex"
title="`[]`[T](aq: AsyncQueue[T]; i: BackwardsIndex): T">`[]`[T](aq: AsyncQueue[T]; i: BackwardsIndex): T</a></li>
<li><a class="reference" href="#%5B%5D%2CAsyncQueue%5BT%5D%2CNatural"
title="`[]`[T](aq: AsyncQueue[T]; i: Natural): T">`[]`[T](aq: AsyncQueue[T]; i: Natural): T</a></li>
</ul>
<ul class="simple nested-toc-section">[]=
<li><a class="reference" href="#%5B%5D%3D%2CAsyncQueue%5BT%5D%2CBackwardsIndex%2CT"
title="`[]=`[T](aq: AsyncQueue[T]; i: BackwardsIndex; item: T)">`[]=`[T](aq: AsyncQueue[T]; i: BackwardsIndex; item: T)</a></li>
<li><a class="reference" href="#%5B%5D%3D%2CAsyncQueue%5BT%5D%2CNatural%2CT"
title="`[]=`[T](aq: AsyncQueue[T]; i: Natural; item: T)">`[]=`[T](aq: AsyncQueue[T]; i: Natural; item: T)</a></li>
</ul>
<ul class="simple nested-toc-section">acquire
<li><a class="reference" href="#acquire%2CAsyncLock"
title="acquire(lock: AsyncLock): InternalRaisesFuture[void, (CancelledError,)]">acquire(lock: AsyncLock): InternalRaisesFuture[void, (CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">addFirst
<li><a class="reference" href="#addFirst%2CAsyncQueue%5BT%5D%2CT"
title="addFirst[T](aq: AsyncQueue[T]; item: T): InternalRaisesFuture[void,
(CancelledError,)]">addFirst[T](aq: AsyncQueue[T]; item: T): InternalRaisesFuture[void,
(CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">addFirstNoWait
<li><a class="reference" href="#addFirstNoWait%2CAsyncQueue%5BT%5D%2CT"
title="addFirstNoWait[T](aq: AsyncQueue[T]; item: T)">addFirstNoWait[T](aq: AsyncQueue[T]; item: T)</a></li>
</ul>
<ul class="simple nested-toc-section">addLast
<li><a class="reference" href="#addLast%2CAsyncQueue%5BT%5D%2CT"
title="addLast[T](aq: AsyncQueue[T]; item: T): InternalRaisesFuture[void,
(CancelledError,)]">addLast[T](aq: AsyncQueue[T]; item: T): InternalRaisesFuture[void,
(CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">addLastNoWait
<li><a class="reference" href="#addLastNoWait%2CAsyncQueue%5BT%5D%2CT"
title="addLastNoWait[T](aq: AsyncQueue[T]; item: T)">addLastNoWait[T](aq: AsyncQueue[T]; item: T)</a></li>
</ul>
<ul class="simple nested-toc-section">clear
<li><a class="reference" href="#clear%2CAsyncEvent"
title="clear(event: AsyncEvent)">clear(event: AsyncEvent)</a></li>
<li><a class="reference" href="#clear%2CAsyncQueue%5BT%5D"
title="clear[T](aq: AsyncQueue[T])">clear[T](aq: AsyncQueue[T])</a></li>
</ul>
<ul class="simple nested-toc-section">close
<li><a class="reference" href="#close%2CAsyncEventQueue"
title="close(ab: AsyncEventQueue)">close(ab: AsyncEventQueue)</a></li>
</ul>
<ul class="simple nested-toc-section">closeWait
<li><a class="reference" href="#closeWait%2CAsyncEventQueue"
title="closeWait(ab: AsyncEventQueue): InternalRaisesFuture[void, void]">closeWait(ab: AsyncEventQueue): InternalRaisesFuture[void, void]</a></li>
</ul>
<ul class="simple nested-toc-section">contains
<li><a class="reference" href="#contains%2CAsyncQueue%5BT%5D%2CT"
title="contains[T](aq: AsyncQueue[T]; item: T): bool">contains[T](aq: AsyncQueue[T]; item: T): bool</a></li>
</ul>
<ul class="simple nested-toc-section">emit
<li><a class="reference" href="#emit%2CAsyncEventQueue%5BT%5D%2CT"
title="emit[T](ab: AsyncEventQueue[T]; data: T)">emit[T](ab: AsyncEventQueue[T]; data: T)</a></li>
</ul>
<ul class="simple nested-toc-section">empty
<li><a class="reference" href="#empty%2CAsyncQueue%5BT%5D"
title="empty[T](aq: AsyncQueue[T]): bool">empty[T](aq: AsyncQueue[T]): bool</a></li>
</ul>
<ul class="simple nested-toc-section">fire
<li><a class="reference" href="#fire%2CAsyncEvent"
title="fire(event: AsyncEvent)">fire(event: AsyncEvent)</a></li>
</ul>
<ul class="simple nested-toc-section">full
<li><a class="reference" href="#full%2CAsyncQueue%5BT%5D"
title="full[T](aq: AsyncQueue[T]): bool">full[T](aq: AsyncQueue[T]): bool</a></li>
</ul>
<ul class="simple nested-toc-section">get
<li><a class="reference" href="#get%2CAsyncQueue%5BT%5D"
title="get[T](aq: AsyncQueue[T]): InternalRaisesFuture[T, (CancelledError,)]">get[T](aq: AsyncQueue[T]): InternalRaisesFuture[T, (CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">getNoWait
<li><a class="reference" href="#getNoWait%2CAsyncQueue%5BT%5D"
title="getNoWait[T](aq: AsyncQueue[T]): T">getNoWait[T](aq: AsyncQueue[T]): T</a></li>
</ul>
<ul class="simple nested-toc-section">isSet
<li><a class="reference" href="#isSet%2CAsyncEvent"
title="isSet(event: AsyncEvent): bool">isSet(event: AsyncEvent): bool</a></li>
</ul>
<ul class="simple nested-toc-section">len
<li><a class="reference" href="#len%2CAsyncEventQueue"
title="len(ab: AsyncEventQueue): int">len(ab: AsyncEventQueue): int</a></li>
<li><a class="reference" href="#len%2CAsyncQueue%5BT%5D"
title="len[T](aq: AsyncQueue[T]): int">len[T](aq: AsyncQueue[T]): int</a></li>
</ul>
<ul class="simple nested-toc-section">locked
<li><a class="reference" href="#locked%2CAsyncLock"
title="locked(lock: AsyncLock): bool">locked(lock: AsyncLock): bool</a></li>
</ul>
<ul class="simple nested-toc-section">newAsyncEvent
<li><a class="reference" href="#newAsyncEvent"
title="newAsyncEvent(): AsyncEvent">newAsyncEvent(): AsyncEvent</a></li>
</ul>
<ul class="simple nested-toc-section">newAsyncEventQueue
<li><a class="reference" href="#newAsyncEventQueue%2Cint"
title="newAsyncEventQueue[T](limitSize = 0): AsyncEventQueue[T]">newAsyncEventQueue[T](limitSize = 0): AsyncEventQueue[T]</a></li>
</ul>
<ul class="simple nested-toc-section">newAsyncLock
<li><a class="reference" href="#newAsyncLock"
title="newAsyncLock(): AsyncLock">newAsyncLock(): AsyncLock</a></li>
</ul>
<ul class="simple nested-toc-section">newAsyncQueue
<li><a class="reference" href="#newAsyncQueue%2Cint"
title="newAsyncQueue[T](maxsize: int = 0): AsyncQueue[T]">newAsyncQueue[T](maxsize: int = 0): AsyncQueue[T]</a></li>
</ul>
<ul class="simple nested-toc-section">popFirst
<li><a class="reference" href="#popFirst%2CAsyncQueue%5BT%5D"
title="popFirst[T](aq: AsyncQueue[T]): InternalRaisesFuture[T, (CancelledError,)]">popFirst[T](aq: AsyncQueue[T]): InternalRaisesFuture[T, (CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">popFirstNoWait
<li><a class="reference" href="#popFirstNoWait%2CAsyncQueue%5BT%5D"
title="popFirstNoWait[T](aq: AsyncQueue[T]): T">popFirstNoWait[T](aq: AsyncQueue[T]): T</a></li>
</ul>
<ul class="simple nested-toc-section">popLast
<li><a class="reference" href="#popLast%2CAsyncQueue%5BT%5D"
title="popLast[T](aq: AsyncQueue[T]): InternalRaisesFuture[T, (CancelledError,)]">popLast[T](aq: AsyncQueue[T]): InternalRaisesFuture[T, (CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">popLastNoWait
<li><a class="reference" href="#popLastNoWait%2CAsyncQueue%5BT%5D"
title="popLastNoWait[T](aq: AsyncQueue[T]): T">popLastNoWait[T](aq: AsyncQueue[T]): T</a></li>
</ul>
<ul class="simple nested-toc-section">put
<li><a class="reference" href="#put%2CAsyncQueue%5BT%5D%2CT"
title="put[T](aq: AsyncQueue[T]; item: T): InternalRaisesFuture[void, (CancelledError,)]">put[T](aq: AsyncQueue[T]; item: T): InternalRaisesFuture[void, (CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">putNoWait
<li><a class="reference" href="#putNoWait%2CAsyncQueue%5BT%5D%2CT"
title="putNoWait[T](aq: AsyncQueue[T]; item: T)">putNoWait[T](aq: AsyncQueue[T]; item: T)</a></li>
</ul>
<ul class="simple nested-toc-section">register
<li><a class="reference" href="#register%2CAsyncEventQueue"
title="register(ab: AsyncEventQueue): EventQueueKey">register(ab: AsyncEventQueue): EventQueueKey</a></li>
</ul>
<ul class="simple nested-toc-section">release
<li><a class="reference" href="#release%2CAsyncLock"
title="release(lock: AsyncLock)">release(lock: AsyncLock)</a></li>
</ul>
<ul class="simple nested-toc-section">size
<li><a class="reference" href="#size%2CAsyncQueue%5BT%5D"
title="size[T](aq: AsyncQueue[T]): int">size[T](aq: AsyncQueue[T]): int</a></li>
</ul>
<ul class="simple nested-toc-section">unregister
<li><a class="reference" href="#unregister%2CAsyncEventQueue%2CEventQueueKey"
title="unregister(ab: AsyncEventQueue; key: EventQueueKey)">unregister(ab: AsyncEventQueue; key: EventQueueKey)</a></li>
</ul>
<ul class="simple nested-toc-section">wait
<li><a class="reference" href="#wait%2CAsyncEvent"
title="wait(event: AsyncEvent): InternalRaisesFuture[void, (CancelledError,)]">wait(event: AsyncEvent): InternalRaisesFuture[void, (CancelledError,)]</a></li>
</ul>
<ul class="simple nested-toc-section">waitEvents
<li><a class="reference" href="#waitEvents%2CAsyncEventQueue%5BT%5D%2CEventQueueKey%2Cint"
title="waitEvents[T](ab: AsyncEventQueue[T]; key: EventQueueKey; eventsCount = -1): InternalRaisesFuture[
seq[T], (AsyncEventQueueFullError, CancelledError)]">waitEvents[T](ab: AsyncEventQueue[T]; key: EventQueueKey; eventsCount = -1): InternalRaisesFuture[
seq[T], (AsyncEventQueueFullError, CancelledError)]</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">items
<li><a class="reference" href="#items.i%2CAsyncQueue%5BT%5D"
title="items[T](aq: AsyncQueue[T]): T">items[T](aq: AsyncQueue[T]): T</a></li>
</ul>
<ul class="simple nested-toc-section">mitems
<li><a class="reference" href="#mitems.i%2CAsyncQueue%5BT%5D"
title="mitems[T](aq: AsyncQueue[T]): var T">mitems[T](aq: AsyncQueue[T]): var T</a></li>
</ul>
<ul class="simple nested-toc-section">pairs
<li><a class="reference" href="#pairs.i%2CAsyncQueue%5BT%5D"
title="pairs[T](aq: AsyncQueue[T]): tuple[key: int, val: T]">pairs[T](aq: AsyncQueue[T]): tuple[key: int, val: T]</a></li>
</ul>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#18" id="68">Templates</a>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">readerOverflow
<li><a class="reference" href="#readerOverflow.t%2CAsyncEventQueue%2CEventQueueReader"
title="readerOverflow(ab: AsyncEventQueue; reader: EventQueueReader): bool">readerOverflow(ab: AsyncEventQueue; reader: EventQueueReader): bool</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/asyncsync.nim#L1"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
<div class="nine columns" id="content">
<div id="tocRoot"></div>
<p class="module-desc">This module implements some core synchronization primitives.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="asyncloop.html">asyncloop</a>
</dl></div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="AsyncEvent">
<dt><pre><a href="asyncsync.html#AsyncEvent"><span class="Identifier">AsyncEvent</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">flag</span><span class="Other">:</span> <span class="Identifier">bool</span>
<span class="Identifier">waiters</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="futures.html#Future"><span class="Identifier">Future</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">.</span><span class="Identifier">Raising</span><span class="Other">(</span><span class="Other">[</span><span class="Identifier">CancelledError</span><span class="Other">]</span><span class="Other">)</span><span class="Other">]</span>
</pre></dt>
<dd>
<p>A primitive event object.</p>
<p>An event manages a flag that can be set to <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> with the <tt class="docutils literal"><span class="pre">fire()</span></tt> procedure and reset to <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt> with the <tt class="docutils literal"><span class="pre">clear()</span></tt> procedure. The <tt class="docutils literal"><span class="pre">wait()</span></tt> coroutine blocks until the flag is <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt>.</p>
<p>If more than one coroutine blocked in <tt class="docutils literal"><span class="pre">wait()</span></tt> waiting for event state to be signaled, when event get fired, then all coroutines continue proceeds in order, they have entered waiting state.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L33"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L33" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncEventQueue">
<dt><pre><a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">RootObj</span>
<span class="Identifier">readers</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="asyncsync.html#EventQueueReader"><span class="Identifier">EventQueueReader</span></a><span class="Other">]</span>
<span class="Identifier">queue</span><span class="Other">:</span> <span class="Identifier">Deque</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span>
<span class="Identifier">counter</span><span class="Other">:</span> <span class="Identifier">uint64</span>
<span class="Identifier">limit</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">offset</span><span class="Other">:</span> <span class="Identifier">int</span>
</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L75"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L75" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncEventQueueFullError">
<dt><pre><a href="asyncsync.html#AsyncEventQueueFullError"><span class="Identifier">AsyncEventQueueFullError</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="internal/errors.html#AsyncError"><span class="Identifier">AsyncError</span></a></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L65"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L65" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncLock">
<dt><pre><a href="asyncsync.html#AsyncLock"><span class="Identifier">AsyncLock</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">locked</span><span class="Other">:</span> <span class="Identifier">bool</span>
<span class="Identifier">acquired</span><span class="Other">:</span> <span class="Identifier">bool</span>
<span class="Identifier">waiters</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="futures.html#Future"><span class="Identifier">Future</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">.</span><span class="Identifier">Raising</span><span class="Other">(</span><span class="Other">[</span><span class="Identifier">CancelledError</span><span class="Other">]</span><span class="Other">)</span><span class="Other">]</span>
</pre></dt>
<dd>
<p>A primitive lock is a synchronization primitive that is not owned by a particular coroutine when locked. A primitive lock is in one of two states, <tt class="docutils literal"><span class="pre">locked</span></tt> or <tt class="docutils literal"><span class="pre">unlocked</span></tt>.</p>
<p>When more than one coroutine is blocked in <tt class="docutils literal"><span class="pre">acquire()</span></tt> waiting for the state to turn to unlocked, only one coroutine proceeds when a <tt class="docutils literal"><span class="pre">release()</span></tt> call resets the state to unlocked; first coroutine which is blocked in <tt class="docutils literal"><span class="pre">acquire()</span></tt> is being processed.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L20"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L20" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncLockError">
<dt><pre><a href="asyncsync.html#AsyncLockError"><span class="Identifier">AsyncLockError</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="internal/errors.html#AsyncError"><span class="Identifier">AsyncError</span></a>
</pre></dt>
<dd>
<tt class="docutils literal"><span class="pre">AsyncLock</span></tt> is either locked or unlocked.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L62"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L62" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncQueue">
<dt><pre><a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <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">getters</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="futures.html#Future"><span class="Identifier">Future</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">.</span><span class="Identifier">Raising</span><span class="Other">(</span><span class="Other">[</span><span class="Identifier">CancelledError</span><span class="Other">]</span><span class="Other">)</span><span class="Other">]</span>
<span class="Identifier">putters</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="futures.html#Future"><span class="Identifier">Future</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">.</span><span class="Identifier">Raising</span><span class="Other">(</span><span class="Other">[</span><span class="Identifier">CancelledError</span><span class="Other">]</span><span class="Other">)</span><span class="Other">]</span>
<span class="Identifier">queue</span><span class="Other">:</span> <span class="Identifier">Deque</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span>
<span class="Identifier">maxsize</span><span class="Other">:</span> <span class="Identifier">int</span>
</pre></dt>
<dd>
<p>A queue, useful for coordinating producer and consumer coroutines.</p>
<p>If <tt class="docutils literal"><span class="pre">maxsize</span></tt> is less than or equal to zero, the queue size is infinite. If it is an integer greater than <tt class="docutils literal"><span class="pre">0</span></tt>, then &quot;await put()&quot; will block when the queue reaches <tt class="docutils literal"><span class="pre">maxsize</span></tt>, until an item is removed by &quot;await get()&quot;.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L46"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L46" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncQueueEmptyError">
<dt><pre><a href="asyncsync.html#AsyncQueueEmptyError"><span class="Identifier">AsyncQueueEmptyError</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="internal/errors.html#AsyncError"><span class="Identifier">AsyncError</span></a>
</pre></dt>
<dd>
<tt class="docutils literal"><span class="pre">AsyncQueue</span></tt> is empty.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L58"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L58" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="AsyncQueueFullError">
<dt><pre><a href="asyncsync.html#AsyncQueueFullError"><span class="Identifier">AsyncQueueFullError</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="internal/errors.html#AsyncError"><span class="Identifier">AsyncError</span></a>
</pre></dt>
<dd>
<tt class="docutils literal"><span class="pre">AsyncQueue</span></tt> is full.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L60"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L60" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="EventQueueKey">
<dt><pre><a href="asyncsync.html#EventQueueKey"><span class="Identifier">EventQueueKey</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">uint64</span></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L67"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L67" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="EventQueueReader">
<dt><pre><a href="asyncsync.html#EventQueueReader"><span class="Identifier">EventQueueReader</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">key</span><span class="Other">:</span> <a href="asyncsync.html#EventQueueKey"><span class="Identifier">EventQueueKey</span></a>
<span class="Identifier">offset</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">waiter</span><span class="Other">:</span> <a href="futures.html#Future"><span class="Identifier">Future</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">.</span><span class="Identifier">Raising</span><span class="Other">(</span><span class="Other">[</span><span class="Identifier">CancelledError</span><span class="Other">]</span><span class="Other">)</span>
<span class="Identifier">overflow</span><span class="Other">:</span> <span class="Identifier">bool</span>
</pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L69"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L69" 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="$,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#%24%2CAsyncQueue%5BT%5D"><span class="Identifier">`$`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Turn an async queue <tt class="docutils literal"><span class="pre">aq</span></tt> into its string representation.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L432"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L432" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="[]=,AsyncQueue[T],BackwardsIndex,T">
<dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CAsyncQueue%5BT%5D%2CBackwardsIndex%2CT"><span class="Identifier">`[]=`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">BackwardsIndex</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">T</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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Change the i-th element of <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L406"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L406" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="[]=,AsyncQueue[T],Natural,T">
<dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CAsyncQueue%5BT%5D%2CNatural%2CT"><span class="Identifier">`[]=`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">Natural</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">T</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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Change the i-th element of <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L402"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L402" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="[],AsyncQueue[T],BackwardsIndex">
<dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CAsyncQueue%5BT%5D%2CBackwardsIndex"><span class="Identifier">`[]`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">BackwardsIndex</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</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>.}</pre></dt>
<dd>
Access the i-th element of <tt class="docutils literal"><span class="pre">aq</span></tt> by order from first to last. <tt class="docutils literal"><span class="pre">aq[0]</span></tt> is the first element, <tt class="docutils literal"><span class="pre">aq[^1]</span></tt> is the last element.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L397"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L397" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="[],AsyncQueue[T],Natural">
<dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CAsyncQueue%5BT%5D%2CNatural"><span class="Identifier">`[]`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">Natural</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</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>.}</pre></dt>
<dd>
Access the i-th element of <tt class="docutils literal"><span class="pre">aq</span></tt> by order from first to last. <tt class="docutils literal"><span class="pre">aq[0]</span></tt> is the first element, <tt class="docutils literal"><span class="pre">aq[^1]</span></tt> is the last element.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L392"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L392" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="acquire,AsyncLock">
<dt><pre><span class="Keyword">proc</span> <a href="#acquire%2CAsyncLock"><span class="Identifier">acquire</span></a><span class="Other">(</span><span class="Identifier">lock</span><span class="Other">:</span> <a href="asyncsync.html#AsyncLock"><span class="Identifier">AsyncLock</span></a><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.
<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">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>
<p>Acquire a lock <tt class="docutils literal"><span class="pre">lock</span></tt>.</p>
<p>This procedure blocks until the lock <tt class="docutils literal"><span class="pre">lock</span></tt> is unlocked, then sets it to locked and returns.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L120"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L120" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addFirst,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#addFirst%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">addFirst</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span>
<span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Put an <tt class="docutils literal"><span class="pre">item</span></tt> to the beginning of the queue <tt class="docutils literal"><span class="pre">aq</span></tt>. If the queue is full, wait until a free slot is available before adding item.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L297"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L297" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addFirstNoWait,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#addFirstNoWait%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">addFirstNoWait</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</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">raises</span><span class="Other">:</span> <span class="Other">[</span><a href="asyncsync.html#AsyncQueueFullError"><span class="Identifier">AsyncQueueFullError</span></a><span class="Other">]</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>
<p>Put an item <tt class="docutils literal"><span class="pre">item</span></tt> to the beginning of the queue <tt class="docutils literal"><span class="pre">aq</span></tt> immediately.</p>
<p>If queue <tt class="docutils literal"><span class="pre">aq</span></tt> is full, then <tt class="docutils literal"><span class="pre">AsyncQueueFullError</span></tt> exception raised.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L260"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L260" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addLast,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#addLast%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">addLast</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span>
<span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Put an <tt class="docutils literal"><span class="pre">item</span></tt> to the end of the queue <tt class="docutils literal"><span class="pre">aq</span></tt>. If the queue is full, wait until a free slot is available before adding item.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L313"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L313" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="addLastNoWait,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#addLastNoWait%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">addLastNoWait</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</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">raises</span><span class="Other">:</span> <span class="Other">[</span><a href="asyncsync.html#AsyncQueueFullError"><span class="Identifier">AsyncQueueFullError</span></a><span class="Other">]</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>
<p>Put an item <tt class="docutils literal"><span class="pre">item</span></tt> at the end of the queue <tt class="docutils literal"><span class="pre">aq</span></tt> immediately.</p>
<p>If queue <tt class="docutils literal"><span class="pre">aq</span></tt> is full, then <tt class="docutils literal"><span class="pre">AsyncQueueFullError</span></tt> exception raised.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L269"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L269" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="clear,AsyncEvent">
<dt><pre><span class="Keyword">proc</span> <a href="#clear%2CAsyncEvent"><span class="Identifier">clear</span></a><span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEvent"><span class="Identifier">AsyncEvent</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>
Reset the internal flag of <tt class="docutils literal"><span class="pre">event</span></tt> to <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt>. Subsequently, tasks calling <tt class="docutils literal"><span class="pre"><span class="Identifier">wait</span><span class="Punctuation">(</span><span class="Punctuation">)</span></span></tt> will block until <tt class="docutils literal"><span class="pre"><span class="Identifier">fire</span><span class="Punctuation">(</span><span class="Punctuation">)</span></span></tt> is called to set the internal flag to <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> again.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L194"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L194" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="clear,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#clear%2CAsyncQueue%5BT%5D"><span class="Identifier">clear</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Clears all elements of queue <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L380"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L380" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="close,AsyncEventQueue">
<dt><pre><span class="Keyword">proc</span> <a href="#close%2CAsyncEventQueue"><span class="Identifier">close</span></a><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</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">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/asyncsync.nim#L513"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L513" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="closeWait,AsyncEventQueue">
<dt><pre><span class="Keyword">proc</span> <a href="#closeWait%2CAsyncEventQueue"><span class="Identifier">closeWait</span></a><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">void</span><span class="Other">]</span> {.
<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">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/asyncsync.nim#L521"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L521" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="contains,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#contains%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">contains</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</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>.}</pre></dt>
<dd>
Return true if <tt class="docutils literal"><span class="pre">item</span></tt> is in <tt class="docutils literal"><span class="pre">aq</span></tt> or false if not found. Usually used via the <tt class="docutils literal"><span class="pre">in</span></tt> operator.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L425"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L425" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="emit,AsyncEventQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#emit%2CAsyncEventQueue%5BT%5D%2CT"><span class="Identifier">emit</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">data</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">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/asyncsync.nim#L540"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L540" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="empty,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#empty%2CAsyncQueue%5BT%5D"><span class="Identifier">empty</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</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>.}</pre></dt>
<dd>
Return <tt class="docutils literal"><span class="pre">true</span></tt> if the queue is empty, <tt class="docutils literal"><span class="pre">false</span></tt> otherwise.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L238"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L238" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="fire,AsyncEvent">
<dt><pre><span class="Keyword">proc</span> <a href="#fire%2CAsyncEvent"><span class="Identifier">fire</span></a><span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEvent"><span class="Identifier">AsyncEvent</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 the internal flag of <tt class="docutils literal"><span class="pre">event</span></tt> to <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt>. All tasks waiting for it to become <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> are awakened. Task that call <tt class="docutils literal"><span class="pre"><span class="Identifier">wait</span><span class="Punctuation">(</span><span class="Punctuation">)</span></span></tt> once the flag is <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> will not block at all.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L183"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L183" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="full,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#full%2CAsyncQueue%5BT%5D"><span class="Identifier">full</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</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>.}</pre></dt>
<dd>
<p>Return <tt class="docutils literal"><span class="pre">true</span></tt> if there are <tt class="docutils literal"><span class="pre">maxsize</span></tt> items in the queue.</p>
<p>Note: If the <tt class="docutils literal"><span class="pre">aq</span></tt> was initialized with <tt class="docutils literal"><span class="pre">maxsize = 0</span></tt> (default), then <tt class="docutils literal"><span class="pre">full()</span></tt> is never <tt class="docutils literal"><span class="pre">true</span></tt>.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L228"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L228" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="get,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#get%2CAsyncQueue%5BT%5D"><span class="Identifier">get</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">,</span> <span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.
<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">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/asyncsync.nim#L376"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L376" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="getNoWait,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#getNoWait%2CAsyncQueue%5BT%5D"><span class="Identifier">getNoWait</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><a href="asyncsync.html#AsyncQueueEmptyError"><span class="Identifier">AsyncQueueEmptyError</span></a><span class="Other">]</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>
Alias of <tt class="docutils literal"><span class="pre">popFirstNoWait()</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L365"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L365" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="isSet,AsyncEvent">
<dt><pre><span class="Keyword">proc</span> <a href="#isSet%2CAsyncEvent"><span class="Identifier">isSet</span></a><span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEvent"><span class="Identifier">AsyncEvent</span></a><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">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 <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> if and only if the internal flag of <tt class="docutils literal"><span class="pre">event</span></tt> is <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L200"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L200" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="len,AsyncEventQueue">
<dt><pre><span class="Keyword">proc</span> <a href="#len%2CAsyncEventQueue"><span class="Identifier">len</span></a><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</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">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/asyncsync.nim#L491"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L491" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="len,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#len%2CAsyncQueue%5BT%5D"><span class="Identifier">len</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</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>.}</pre></dt>
<dd>
Return the number of elements in <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L384"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L384" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="locked,AsyncLock">
<dt><pre><span class="Keyword">proc</span> <a href="#locked%2CAsyncLock"><span class="Identifier">locked</span></a><span class="Other">(</span><span class="Identifier">lock</span><span class="Other">:</span> <a href="asyncsync.html#AsyncLock"><span class="Identifier">AsyncLock</span></a><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">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 <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> if the lock <tt class="docutils literal"><span class="pre">lock</span></tt> is acquired, <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt> otherwise.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L135"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L135" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="newAsyncEvent">
<dt><pre><span class="Keyword">proc</span> <a href="#newAsyncEvent"><span class="Identifier">newAsyncEvent</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEvent"><span class="Identifier">AsyncEvent</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>
<p>Creates new asyncronous event <tt class="docutils literal"><span class="pre">AsyncEvent</span></tt>.</p>
<p>An event manages a flag that can be set to <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> with the <tt class="docutils literal"><span class="pre"><span class="Identifier">fire</span><span class="Punctuation">(</span><span class="Punctuation">)</span></span></tt> procedure and reset to <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt> with the <tt class="docutils literal"><span class="pre"><span class="Identifier">clear</span><span class="Punctuation">(</span><span class="Punctuation">)</span></span></tt> procedure. The <tt class="docutils literal"><span class="pre"><span class="Identifier">wait</span><span class="Punctuation">(</span><span class="Punctuation">)</span></span></tt> procedure blocks until the flag is <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt>. The flag is initially <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt>.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L158"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L158" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="newAsyncEventQueue,int">
<dt><pre><span class="Keyword">proc</span> <a href="#newAsyncEventQueue%2Cint"><span class="Identifier">newAsyncEventQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">limitSize</span> <span class="Other">=</span> <span class="DecNumber">0</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</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>
<p>Creates new <tt class="docutils literal"><span class="pre">AsyncEventBus</span></tt> maximum size of <tt class="docutils literal"><span class="pre">limitSize</span></tt> (default is <tt class="docutils literal"><span class="pre">0</span></tt> which means that there no limits).</p>
<p>When number of events emitted exceeds <tt class="docutils literal"><span class="pre">limitSize</span></tt> - emit() procedure will discard new events, consumers which has number of pending events more than <tt class="docutils literal"><span class="pre">limitSize</span></tt> will get <tt class="docutils literal"><span class="pre">AsyncEventQueueFullError</span></tt> error.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L472"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L472" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="newAsyncLock">
<dt><pre><span class="Keyword">proc</span> <a href="#newAsyncLock"><span class="Identifier">newAsyncLock</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncsync.html#AsyncLock"><span class="Identifier">AsyncLock</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>
<p>Creates new asynchronous lock <tt class="docutils literal"><span class="pre">AsyncLock</span></tt>.</p>
<p>Lock is created in the unlocked state. When the state is unlocked, <tt class="docutils literal"><span class="pre">acquire()</span></tt> changes the state to locked and returns immediately. When the state is locked, <tt class="docutils literal"><span class="pre">acquire()</span></tt> blocks until a call to <tt class="docutils literal"><span class="pre">release()</span></tt> in another coroutine changes it to unlocked.</p>
<p>The <tt class="docutils literal"><span class="pre">release()</span></tt> procedure changes the state to unlocked and returns immediately.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L82"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L82" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="newAsyncQueue,int">
<dt><pre><span class="Keyword">proc</span> <a href="#newAsyncQueue%2Cint"><span class="Identifier">newAsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">maxsize</span><span class="Other">:</span> <span class="Identifier">int</span> <span class="Other">=</span> <span class="DecNumber">0</span><span class="Other">)</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Creates a new asynchronous queue <tt class="docutils literal"><span class="pre">AsyncQueue</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L204"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L204" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="popFirst,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#popFirst%2CAsyncQueue%5BT%5D"><span class="Identifier">popFirst</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">,</span> <span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.
<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Remove and return an <tt class="docutils literal"><span class="pre">item</span></tt> from the beginning of the queue <tt class="docutils literal"><span class="pre">aq</span></tt>. If the queue is empty, wait until an item is available.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L329"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L329" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="popFirstNoWait,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#popFirstNoWait%2CAsyncQueue%5BT%5D"><span class="Identifier">popFirstNoWait</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><a href="asyncsync.html#AsyncQueueEmptyError"><span class="Identifier">AsyncQueueEmptyError</span></a><span class="Other">]</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>
<p>Get an item from the beginning of the queue <tt class="docutils literal"><span class="pre">aq</span></tt> immediately.</p>
<p>If queue <tt class="docutils literal"><span class="pre">aq</span></tt> is empty, then <tt class="docutils literal"><span class="pre">AsyncQueueEmptyError</span></tt> exception raised.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L278"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L278" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="popLast,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#popLast%2CAsyncQueue%5BT%5D"><span class="Identifier">popLast</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">,</span> <span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.
<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Remove and return an <tt class="docutils literal"><span class="pre">item</span></tt> from the end of the queue <tt class="docutils literal"><span class="pre">aq</span></tt>. If the queue is empty, wait until an item is available.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L345"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L345" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="popLastNoWait,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#popLastNoWait%2CAsyncQueue%5BT%5D"><span class="Identifier">popLastNoWait</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><a href="asyncsync.html#AsyncQueueEmptyError"><span class="Identifier">AsyncQueueEmptyError</span></a><span class="Other">]</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>
<p>Get an item from the end of the queue <tt class="docutils literal"><span class="pre">aq</span></tt> immediately.</p>
<p>If queue <tt class="docutils literal"><span class="pre">aq</span></tt> is empty, then <tt class="docutils literal"><span class="pre">AsyncQueueEmptyError</span></tt> exception raised.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L287"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L287" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="put,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#put%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">put</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span>
<span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">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/asyncsync.nim#L371"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L371" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="putNoWait,AsyncQueue[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#putNoWait%2CAsyncQueue%5BT%5D%2CT"><span class="Identifier">putNoWait</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">item</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">raises</span><span class="Other">:</span> <span class="Other">[</span><a href="asyncsync.html#AsyncQueueFullError"><span class="Identifier">AsyncQueueFullError</span></a><span class="Other">]</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>
Alias of <tt class="docutils literal"><span class="pre">addLastNoWait()</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L360"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L360" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="register,AsyncEventQueue">
<dt><pre><span class="Keyword">proc</span> <a href="#register%2CAsyncEventQueue"><span class="Identifier">register</span></a><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">)</span><span class="Other">:</span> <a href="asyncsync.html#EventQueueKey"><span class="Identifier">EventQueueKey</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">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/asyncsync.nim#L494"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L494" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="release,AsyncLock">
<dt><pre><span class="Keyword">proc</span> <a href="#release%2CAsyncLock"><span class="Identifier">release</span></a><span class="Other">(</span><span class="Identifier">lock</span><span class="Other">:</span> <a href="asyncsync.html#AsyncLock"><span class="Identifier">AsyncLock</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><a href="asyncsync.html#AsyncLockError"><span class="Identifier">AsyncLockError</span></a><span class="Other">]</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>
<p>Release a lock <tt class="docutils literal"><span class="pre">lock</span></tt>.</p>
<p>When the <tt class="docutils literal"><span class="pre">lock</span></tt> is locked, reset it to unlocked, and return. If any other coroutines are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed.</p>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L139"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L139" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="size,AsyncQueue[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#size%2CAsyncQueue%5BT%5D"><span class="Identifier">size</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</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>.}</pre></dt>
<dd>
Return the maximum number of elements in <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L388"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L388" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="unregister,AsyncEventQueue,EventQueueKey">
<dt><pre><span class="Keyword">proc</span> <a href="#unregister%2CAsyncEventQueue%2CEventQueueKey"><span class="Identifier">unregister</span></a><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <a href="asyncsync.html#EventQueueKey"><span class="Identifier">EventQueueKey</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">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/asyncsync.nim#L502"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L502" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="wait,AsyncEvent">
<dt><pre><span class="Keyword">proc</span> <a href="#wait%2CAsyncEvent"><span class="Identifier">wait</span></a><span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEvent"><span class="Identifier">AsyncEvent</span></a><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Other">(</span><a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">,</span><span class="Other">)</span><span class="Other">]</span> {.
<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">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/asyncsync.nim#L168"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L168" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="waitEvents,AsyncEventQueue[T],EventQueueKey,int">
<dt><pre><span class="Keyword">proc</span> <a href="#waitEvents%2CAsyncEventQueue%5BT%5D%2CEventQueueKey%2Cint"><span class="Identifier">waitEvents</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <a href="asyncsync.html#EventQueueKey"><span class="Identifier">EventQueueKey</span></a><span class="Other">;</span> <span class="Identifier">eventsCount</span> <span class="Other">=</span> <span class="DecNumber">-1</span><span class="Other">)</span><span class="Other">:</span> <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a><span class="Other">[</span>
<span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">,</span> <span class="Other">(</span><a href="asyncsync.html#AsyncEventQueueFullError"><span class="Identifier">AsyncEventQueueFullError</span></a><span class="Other">,</span> <a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a><span class="Other">)</span><span class="Other">]</span> {.<span class="Identifier">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</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">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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Wait for events
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L578"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L578" 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="items.i,AsyncQueue[T]">
<dt><pre><span class="Keyword">iterator</span> <a href="#items.i%2CAsyncQueue%5BT%5D"><span class="Identifier">items</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</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>.}</pre></dt>
<dd>
Yield every element of <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L410"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L410" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="mitems.i,AsyncQueue[T]">
<dt><pre><span class="Keyword">iterator</span> <a href="#mitems.i%2CAsyncQueue%5BT%5D"><span class="Identifier">mitems</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</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>.}</pre></dt>
<dd>
Yield every element of <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L415"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L415" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
<div id="pairs.i,AsyncQueue[T]">
<dt><pre><span class="Keyword">iterator</span> <a href="#pairs.i%2CAsyncQueue%5BT%5D"><span class="Identifier">pairs</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">aq</span><span class="Other">:</span> <a href="asyncsync.html#AsyncQueue"><span class="Identifier">AsyncQueue</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">,</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">T</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">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Yield every (position, value) of <tt class="docutils literal"><span class="pre">aq</span></tt>.
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L420"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L420" class="link-seesrc" target="_blank" >Edit</a>
</dd>
</div>
</dl></div>
<div class="section" id="18">
<h1><a class="toc-backref" href="#18">Templates</a></h1>
<dl class="item">
<div id="readerOverflow.t,AsyncEventQueue,EventQueueReader">
<dt><pre><span class="Keyword">template</span> <a href="#readerOverflow.t%2CAsyncEventQueue%2CEventQueueReader"><span class="Identifier">readerOverflow</span></a><span class="Other">(</span><span class="Identifier">ab</span><span class="Other">:</span> <a href="asyncsync.html#AsyncEventQueue"><span class="Identifier">AsyncEventQueue</span></a><span class="Other">;</span> <span class="Identifier">reader</span><span class="Other">:</span> <a href="asyncsync.html#EventQueueReader"><span class="Identifier">EventQueueReader</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span></pre></dt>
<dd>
&nbsp;&nbsp;<a
href="https://github.com/status-im/nim-chronos/tree/master/chronos/asyncsync.nim#L536"
class="link-seesrc" target="_blank">Source</a>
&nbsp;&nbsp;<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/asyncsync.nim#L536" 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="internal/asyncengine.html#setThreadDispatcher,PDispatcher"><span class="Identifier">setThreadDispatcher</span></a>, <a href="internal/asyncengine.html#closeSocket,AsyncFD,CallbackFunc"><span class="Identifier">closeSocket</span></a>, <a href="oserrno.html#ENOSR"><span class="Identifier">ENOSR</span></a>, <a href="oserrno.html#EHOSTUNREACH"><span class="Identifier">EHOSTUNREACH</span></a>, <a href="oserrno.html#EHOSTDOWN"><span class="Identifier">EHOSTDOWN</span></a>, <a href="oserrno.html#ECONNRESET"><span class="Identifier">ECONNRESET</span></a>, <a href="oserrno.html#EDQUOT"><span class="Identifier">EDQUOT</span></a>, <a href="internal/asyncfutures.html#fail.t,InternalRaisesFuture[T,E],ref.CatchableError,staticbool"><span class="Identifier">fail</span></a>, <a href="oserrno.html#ECANCELED"><span class="Identifier">ECANCELED</span></a>, <a href="oserrno.html#EMLINK"><span class="Identifier">EMLINK</span></a>, <a href="internal/asyncfutures.html#FuturePendingError"><span class="Identifier">FuturePendingError</span></a>, <a href="timer.html#milliseconds,SomeIntegerI64"><span class="Identifier">milliseconds</span></a>, <a href="timer.html#<=,Duration,Duration"><span class="Identifier">&lt;=</span></a>, <a href="timer.html#+=,Moment,Duration"><span class="Identifier">+=</span></a>, <a href="timer.html#$,Duration"><span class="Identifier">$</span></a>, <a href="timer.html#asyncTimer"><span class="Identifier">asyncTimer</span></a>, <a href="internal/asyncfutures.html#internalRaiseIfError.m,FutureBase,typed"><span class="Identifier">internalRaiseIfError</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="timer.html#fromNow,typedesc[Moment],Duration"><span class="Identifier">fromNow</span></a>, <a href="timer.html#weeks,Duration"><span class="Identifier">weeks</span></a>, <a href="oserrno.html#ESPIPE"><span class="Identifier">ESPIPE</span></a>, <a href="internal/asyncfutures.html#withTimeout,Future[T],Duration"><span class="Identifier">withTimeout</span></a>, <a href="futures.html#LocationKind"><span class="Identifier">LocationKind</span></a>, <a href="futures.html#id.t,FutureBase"><span class="Identifier">id</span></a>, <a href="timer.html#<=,Moment,Moment"><span class="Identifier">&lt;=</span></a>, <a href="internal/asyncfutures.html#FutureCompletedError"><span class="Identifier">FutureCompletedError</span></a>, <a href="oserrno.html#ENOEXEC"><span class="Identifier">ENOEXEC</span></a>, <a href="oserrno.html#ESHUTDOWN"><span class="Identifier">ESHUTDOWN</span></a>, <a href="internal/asyncfutures.html#fail.t,Future[T],ref.CatchableError,staticbool"><span class="Identifier">fail</span></a>, <a href="oserrno.html#EREMOTEIO"><span class="Identifier">EREMOTEIO</span></a>, <a href="timer.html#toString"><span class="Identifier">toString</span></a>, <a href="oserrno.html#EXFULL"><span class="Identifier">EXFULL</span></a>, <a href="internal/asyncfutures.html#waitFor,Future[void]"><span class="Identifier">waitFor</span></a>, <a href="internal/asyncfutures.html#complete.t,Future[T],T"><span class="Identifier">complete</span></a>, <a href="timer.html#==,Duration,Duration"><span class="Identifier">==</span></a>, <a href="internal/asyncfutures.html#oneValue,varargs[Future[T]]"><span class="Identifier">oneValue</span></a>, <a href="futures.html#internalInitFutureBase,FutureBase,ptr.SrcLoc,FutureState,FutureFlags"><span class="Identifier">internalInitFutureBase</span></a>, <a href="oserrno.html#EPROTONOSUPPORT"><span class="Identifier">EPROTONOSUPPORT</span></a>, <a href="timer.html#Nanosecond"><span class="Identifier">Nanosecond</span></a>, <a href="timer.html#epochNanoSeconds,Moment"><span class="Identifier">epochNanoSeconds</span></a>, <a href="internal/asyncfutures.html#cancelAndWait,FutureBase,ptr.SrcLoc"><span class="Identifier">cancelAndWait</span></a>, <a href="internal/asyncengine.html#addTimer,int64,CallbackFunc,pointer"><span class="Identifier">addTimer</span></a>, <a href="timer.html#Moment"><span class="Identifier">Moment</span></a>, <a href="oserrno.html#ECOMM"><span class="Identifier">ECOMM</span></a>, <a href="oserrno.html#EPROTOTYPE"><span class="Identifier">EPROTOTYPE</span></a>, <a href="internal/errors.html#AsyncExceptionError"><span class="Identifier">AsyncExceptionError</span></a>, <a href="timer.html#milliseconds,Duration"><span class="Identifier">milliseconds</span></a>, <a href="internal/asyncengine.html#getTrackerCounter,string"><span class="Identifier">getTrackerCounter</span></a>, <a href="oserrno.html#ENOENT"><span class="Identifier">ENOENT</span></a>, <a href="timer.html#millis,SomeIntegerI64"><span class="Identifier">millis</span></a>, <a href="internal/asyncengine.html#removeTimer,Moment,CallbackFunc,pointer"><span class="Identifier">removeTimer</span></a>, <a href="futures.html#FutureFlag"><span class="Identifier">FutureFlag</span></a>, <a href="oserrno.html#ENOTCONN"><span class="Identifier">ENOTCONN</span></a>, <a href="oserrno.html#EBUSY"><span class="Identifier">EBUSY</span></a>, <a href="timer.html#init,typedesc[Moment],int64,Duration"><span class="Identifier">init</span></a>, <a href="oserrno.html#ENOTUNIQ"><span class="Identifier">ENOTUNIQ</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="internal/asyncmacro.html#await.t,InternalRaisesFuture[T,E]"><span class="Identifier">await</span></a>, <a href="internal/asyncfutures.html#or,Future[T],Future[Y]"><span class="Identifier">or</span></a>, <a href="timer.html#ZeroDuration"><span class="Identifier">ZeroDuration</span></a>, <a href="oserrno.html#EKEYREVOKED"><span class="Identifier">EKEYREVOKED</span></a>, <a href="internal/errors.html#AsyncTimeoutError"><span class="Identifier">AsyncTimeoutError</span></a>, <a href="oserrno.html#EUCLEAN"><span class="Identifier">EUCLEAN</span></a>, <a href="timer.html#Second"><span class="Identifier">Second</span></a>, <a href="oserrno.html#EEXIST"><span class="Identifier">EEXIST</span></a>, <a href="oserrno.html#ENOLINK"><span class="Identifier">ENOLINK</span></a>, <a href="internal/asyncfutures.html#newInternalRaisesFuture.t,static[string]"><span class="Identifier">newInternalRaisesFuture</span></a>, <a href="internal/asyncfutures.html#idleAsync"><span class="Identifier">idleAsync</span></a>, <a href="internal/asyncengine.html#==,AsyncFD,AsyncFD"><span class="Identifier">==</span></a>, <a href="internal/asyncfutures.html#internalRaiseIfError.m,InternalRaisesFuture,typed,typed"><span class="Identifier">internalRaiseIfError</span></a>, <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a>, <a href="oserrno.html#ENOMEM"><span class="Identifier">ENOMEM</span></a>, <a href="oserrno.html#ENOKEY"><span class="Identifier">ENOKEY</span></a>, <a href="timer.html#+,Duration,Duration"><span class="Identifier">+</span></a>, <a href="internal/asyncengine.html#removeWriter2,AsyncFD"><span class="Identifier">removeWriter2</span></a>, <a href="oserrno.html#ENOMSG"><span class="Identifier">ENOMSG</span></a>, <a href="internal/asyncfutures.html#[],array[LocationKind,ptr.SrcLoc],int"><span class="Identifier">[]</span></a>, <a href="internal/asyncengine.html#trackCounter,string"><span class="Identifier">trackCounter</span></a>, <a href="oserrno.html#EKEYEXPIRED"><span class="Identifier">EKEYEXPIRED</span></a>, <a href="timer.html#Week"><span class="Identifier">Week</span></a>, <a href="internal/asyncengine.html#isCounterLeaked,string"><span class="Identifier">isCounterLeaked</span></a>, <a href="internal/asyncmacro.html#awaitne.t,Future[T]"><span class="Identifier">awaitne</span></a>, <a href="oserrno.html#EAFNOSUPPORT"><span class="Identifier">EAFNOSUPPORT</span></a>, <a href="oserrno.html#EWOULDBLOCK"><span class="Identifier">EWOULDBLOCK</span></a>, <a href="oserrno.html#EREMOTE"><span class="Identifier">EREMOTE</span></a>, <a href="internal/asyncfutures.html#Finished.t,typeFutureState"><span class="Identifier">Finished</span></a>, <a href="internal/asyncengine.html#untrackCounter,string"><span class="Identifier">untrackCounter</span></a>, <a href="internal/asyncengine.html#AsyncCallback"><span class="Identifier">AsyncCallback</span></a>, <a href="oserrno.html#EHWPOISON"><span class="Identifier">EHWPOISON</span></a>, <a href="timer.html#epochSeconds,Moment"><span class="Identifier">epochSeconds</span></a>, <a href="internal/asyncengine.html#newDispatcher"><span class="Identifier">newDispatcher</span></a>, <a href="oserrno.html#EPERM"><span class="Identifier">EPERM</span></a>, <a href="timer.html#microseconds,SomeIntegerI64"><span class="Identifier">microseconds</span></a>, <a href="internal/asyncengine.html#trackerCounters.i,PDispatcher"><span class="Identifier">trackerCounters</span></a>, <a href="timer.html#>=,Moment,Moment"><span class="Identifier">&gt;=</span></a>, <a href="timer.html#weeks,SomeIntegerI64"><span class="Identifier">weeks</span></a>, <a href="internal/asyncfutures.html#Finished.t"><span class="Identifier">Finished</span></a>, <a href="internal/asyncfutures.html#cancelCallback=,FutureBase,CallbackFunc"><span class="Identifier">cancelCallback=</span></a>, <a href="oserrno.html#ETOOMANYREFS"><span class="Identifier">ETOOMANYREFS</span></a>, <a href="srcloc.html#$,ptr.SrcLoc"><span class="Identifier">$</span></a>, <a href="oserrno.html#EISCONN"><span class="Identifier">EISCONN</span></a>, <a href="internal/asyncengine.html#callSoon,InternalAsyncCallback"><span class="Identifier">callSoon</span></a>, <a href="oserrno.html#ESOCKTNOSUPPORT"><span class="Identifier">ESOCKTNOSUPPORT</span></a>, <a href="internal/asyncengine.html#setGlobalDispatcher,PDispatcher"><span class="Identifier">setGlobalDispatcher</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="internal/asyncfutures.html#cancelSoon.t,FutureBase,CallbackFunc"><span class="Identifier">cancelSoon</span></a>, <a href="internal/asyncfutures.html#allFinished,varargs[F]"><span class="Identifier">allFinished</span></a>, <a href="internal/asyncengine.html#TrackerBase"><span class="Identifier">TrackerBase</span></a>, <a href="timer.html#hours,Duration"><span class="Identifier">hours</span></a>, <a href="futures.html#InternalAsyncCallback"><span class="Identifier">InternalAsyncCallback</span></a>, <a href="oserrno.html#EBFONT"><span class="Identifier">EBFONT</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#ELOOP"><span class="Identifier">ELOOP</span></a>, <a href="timer.html#InfiniteDuration"><span class="Identifier">InfiniteDuration</span></a>, <a href="oserrno.html#ETIMEDOUT"><span class="Identifier">ETIMEDOUT</span></a>, <a href="timer.html#>=,Duration,Duration"><span class="Identifier">&gt;=</span></a>, <a href="oserrno.html#EINVAL"><span class="Identifier">EINVAL</span></a>, <a href="futures.html#value,Future[void]"><span class="Identifier">value</span></a>, <a href="oserrno.html#EBADFD"><span class="Identifier">EBADFD</span></a>, <a href="futures.html#Future"><span class="Identifier">Future</span></a>, <a href="futures.html#completed.t,typeFuture,T,static[string]"><span class="Identifier">completed</span></a>, <a href="internal/asyncengine.html#PDispatcher"><span class="Identifier">PDispatcher</span></a>, <a href="oserrno.html#ESRCH"><span class="Identifier">ESRCH</span></a>, <a href="oserrno.html#EL2NSYNC"><span class="Identifier">EL2NSYNC</span></a>, <a href="oserrno.html#EFAULT"><span class="Identifier">EFAULT</span></a>, <a href="timer.html#low.t,typedesc[Moment]"><span class="Identifier">low</span></a>, <a href="oserrno.html#ESTRPIPE"><span class="Identifier">ESTRPIPE</span></a>, <a href="timer.html#-=,Duration,Duration"><span class="Identifier">-=</span></a>, <a href="internal/asyncfutures.html#or,InternalRaisesFuture[T,E1],InternalRaisesFuture[Y,E2]"><span class="Identifier">or</span></a>, <a href="oserrno.html#ENOTSOCK"><span class="Identifier">ENOTSOCK</span></a>, <a href="internal/asyncengine.html#getAsyncTimestamp,Duration"><span class="Identifier">getAsyncTimestamp</span></a>, <a href="internal/asyncmacro.html#await.t,Future[T]"><span class="Identifier">await</span></a>, <a href="timer.html#Hour"><span class="Identifier">Hour</span></a>, <a href="oserrno.html#EIDRM"><span class="Identifier">EIDRM</span></a>, <a href="internal/asyncengine.html#removeReader2,AsyncFD"><span class="Identifier">removeReader2</span></a>, <a href="timer.html#secs,Duration"><span class="Identifier">secs</span></a>, <a href="internal/asyncengine.html#getThreadDispatcher"><span class="Identifier">getThreadDispatcher</span></a>, <a href="internal/asyncfutures.html#futureContinue,FutureBase"><span class="Identifier">futureContinue</span></a>, <a href="oserrno.html#ENOANO"><span class="Identifier">ENOANO</span></a>, <a href="oserrno.html#EADV"><span class="Identifier">EADV</span></a>, <a href="futures.html#CallbackFunc"><span class="Identifier">CallbackFunc</span></a>, <a href="oserrno.html#ENFILE"><span class="Identifier">ENFILE</span></a>, <a href="futures.html#FutureBase"><span class="Identifier">FutureBase</span></a>, <a href="internal/asyncfutures.html#waitFor,InternalRaisesFuture[T: not void,E]"><span class="Identifier">waitFor</span></a>, <a href="timer.html#high.t,typedesc[Duration]"><span class="Identifier">high</span></a>, <a href="timer.html#Microsecond"><span class="Identifier">Microsecond</span></a>, <a href="oserrno.html#ENOPKG"><span class="Identifier">ENOPKG</span></a>, <a href="oserrno.html#ELIBBAD"><span class="Identifier">ELIBBAD</span></a>, <a href="internal/asyncengine.html#callSoon,CallbackFunc,pointer"><span class="Identifier">callSoon</span></a>, <a href="oserrno.html#EOWNERDEAD"><span class="Identifier">EOWNERDEAD</span></a>, <a href="futures.html#flags,FutureBase"><span class="Identifier">flags</span></a>, <a href="oserrno.html#ERANGE"><span class="Identifier">ERANGE</span></a>, <a href="internal/asyncfutures.html#done,FutureBase"><span class="Identifier">done</span></a>, <a href="oserrno.html#ENONET"><span class="Identifier">ENONET</span></a>, <a href="futures.html#completed,FutureBase"><span class="Identifier">completed</span></a>, <a href="internal/asyncengine.html#callSoon,CallbackFunc"><span class="Identifier">callSoon</span></a>, <a href="internal/asyncfutures.html#cancelSoon.t,FutureBase,InternalAsyncCallback"><span class="Identifier">cancelSoon</span></a>, <a href="oserrno.html#EMSGSIZE"><span class="Identifier">EMSGSIZE</span></a>, <a href="oserrno.html#EALREADY"><span class="Identifier">EALREADY</span></a>, <a href="oserrno.html#EBADMSG"><span class="Identifier">EBADMSG</span></a>, <a href="oserrno.html#EILSEQ"><span class="Identifier">EILSEQ</span></a>, <a href="oserrno.html#ENOPROTOOPT"><span class="Identifier">ENOPROTOOPT</span></a>, <a href="srcloc.html#SrcLoc"><span class="Identifier">SrcLoc</span></a>, <a href="internal/asyncfutures.html#allFutures,varargs[Future[T]]"><span class="Identifier">allFutures</span></a>, <a href="timer.html#-,Moment,Duration"><span class="Identifier">-</span></a>, <a href="internal/asyncfutures.html#complete.t,Future[void]"><span class="Identifier">complete</span></a>, <a href="futures.html#FutureState"><span class="Identifier">FutureState</span></a>, <a href="oserrno.html#EBADR"><span class="Identifier">EBADR</span></a>, <a href="timer.html#nanos,Duration"><span class="Identifier">nanos</span></a>, <a href="futures.html#location,FutureBase"><span class="Identifier">location</span></a>, <a href="futures.html#FutureDefect"><span class="Identifier">FutureDefect</span></a>, <a href="oserrno.html#EDOTDOT"><span class="Identifier">EDOTDOT</span></a>, <a href="oserrno.html#ENOBUFS"><span class="Identifier">ENOBUFS</span></a>, <a href="oserrno.html#EKEYREJECTED"><span class="Identifier">EKEYREJECTED</span></a>, <a href="timer.html#<,Moment,Moment"><span class="Identifier">&lt;</span></a>, <a href="timer.html#Minute"><span class="Identifier">Minute</span></a>, <a href="futures.html#error,FutureBase"><span class="Identifier">error</span></a>, <a href="timer.html#==,Moment,Moment"><span class="Identifier">==</span></a>, <a href="internal/asyncfutures.html#one,F,varargs[F]"><span class="Identifier">one</span></a>, <a href="futures.html#CancelledError"><span class="Identifier">CancelledError</span></a>, <a href="timer.html#nanoseconds,Duration"><span class="Identifier">nanoseconds</span></a>, <a href="oserrno.html#EISDIR"><span class="Identifier">EISDIR</span></a>, <a href="oserrno.html#EOVERFLOW"><span class="Identifier">EOVERFLOW</span></a>, <a href="internal/asyncfutures.html#FutureSeq"><span class="Identifier">FutureSeq</span></a>, <a href="internal/asyncfutures.html#cancelAndWait.t,FutureBase"><span class="Identifier">cancelAndWait</span></a>, <a href="timer.html#micros,SomeIntegerI64"><span class="Identifier">micros</span></a>, <a href="internal/asyncfutures.html#all,varargs[Future[T]]"><span class="Identifier">all</span></a>, <a href="timer.html#-,Moment,Moment"><span class="Identifier">-</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#EPROTO"><span class="Identifier">EPROTO</span></a>, <a href="internal/asyncengine.html#TimerCallback"><span class="Identifier">TimerCallback</span></a>, <a href="timer.html#microseconds,Duration"><span class="Identifier">microseconds</span></a>, <a href="internal/raisesfutures.html#error,InternalRaisesFuture[T,void]"><span class="Identifier">error</span></a>, <a href="oserrno.html#ENOTRECOVERABLE"><span class="Identifier">ENOTRECOVERABLE</span></a>, <a href="internal/asyncfutures.html#wait,Future[T],int"><span class="Identifier">wait</span></a>, <a href="internal/asyncengine.html#callIdle,CallbackFunc"><span class="Identifier">callIdle</span></a>, <a href="internal/asyncfutures.html#join,SomeFuture"><span class="Identifier">join</span></a>, <a href="timer.html#hours,SomeIntegerI64"><span class="Identifier">hours</span></a>, <a href="internal/errors.html#AsyncError"><span class="Identifier">AsyncError</span></a>, <a href="oserrno.html#EBADRQC"><span class="Identifier">EBADRQC</span></a>, <a href="oserrno.html#ENODEV"><span class="Identifier">ENODEV</span></a>, <a href="internal/asyncfutures.html#tryCancel.t,FutureBase"><span class="Identifier">tryCancel</span></a>, <a href="internal/asyncengine.html#addTimer,Moment,CallbackFunc,pointer"><span class="Identifier">addTimer</span></a>, <a href="oserrno.html#ECHRNG"><span class="Identifier">ECHRNG</span></a>, <a href="oserrno.html#ENOTDIR"><span class="Identifier">ENOTDIR</span></a>, <a href="oserrno.html#EUNATCH"><span class="Identifier">EUNATCH</span></a>, <a href="internal/asyncfutures.html#cancelAndSchedule.t,FutureBase"><span class="Identifier">cancelAndSchedule</span></a>, <a href="futures.html#failed,FutureBase"><span class="Identifier">failed</span></a>, <a href="timer.html#nanoseconds,SomeIntegerI64"><span class="Identifier">nanoseconds</span></a>, <a href="oserrno.html#ERESTART"><span class="Identifier">ERESTART</span></a>, <a href="timer.html#*,SomeIntegerI64,Duration"><span class="Identifier">*</span></a>, <a href="oserrno.html#ETXTBSY"><span class="Identifier">ETXTBSY</span></a>, <a href="internal/asyncengine.html#getTracker,string"><span class="Identifier">getTracker</span></a>, <a href="internal/asyncfutures.html#newFutureStr.t,static[string]"><span class="Identifier">newFutureStr</span></a>, <a href="oserrno.html#EMFILE"><span class="Identifier">EMFILE</span></a>, <a href="internal/asyncfutures.html#LocFinishIndex.t"><span class="Identifier">LocFinishIndex</span></a>, <a href="internal/asyncfutures.html#withTimeout,Future[T],int"><span class="Identifier">withTimeout</span></a>, <a href="internal/asyncengine.html#addTimer,uint64,CallbackFunc,pointer"><span class="Identifier">addTimer</span></a>, <a href="internal/asyncfutures.html#race,openArray[SomeFuture]"><span class="Identifier">race</span></a>, <a href="oserrno.html#EUSERS"><span class="Identifier">EUSERS</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#EISNAM"><span class="Identifier">EISNAM</span></a>, <a href="oserrno.html#ELIBACC"><span class="Identifier">ELIBACC</span></a>, <a href="oserrno.html#ENAVAIL"><span class="Identifier">ENAVAIL</span></a>, <a href="futures.html#init.t,typeFuture[T],static[string],static[FutureFlags]"><span class="Identifier">init</span></a>, <a href="internal/asyncfutures.html#race,openArray[FutureBase]"><span class="Identifier">race</span></a>, <a href="internal/asyncengine.html#internalCallTick,InternalAsyncCallback"><span class="Identifier">internalCallTick</span></a>, <a href="oserrno.html#EDESTADDRREQ"><span class="Identifier">EDESTADDRREQ</span></a>, <a href="timer.html#+,Moment,Duration"><span class="Identifier">+</span></a>, <a href="internal/asyncfutures.html#cancelSoon.t,FutureBase"><span class="Identifier">cancelSoon</span></a>, <a href="futures.html#completed.t,typeFuture,static[string]"><span class="Identifier">completed</span></a>, <a href="timer.html#minutes,SomeIntegerI64"><span class="Identifier">minutes</span></a>, <a href="internal/asyncfutures.html#cancel.t,FutureBase"><span class="Identifier">cancel</span></a>, <a href="futures.html#FutureFlags"><span class="Identifier">FutureFlags</span></a>, <a href="internal/asyncengine.html#getGlobalDispatcher"><span class="Identifier">getGlobalDispatcher</span></a>, <a href="oserrno.html#ELIBEXEC"><span class="Identifier">ELIBEXEC</span></a>, <a href="internal/asyncfutures.html#stepsAsync,int"><span class="Identifier">stepsAsync</span></a>, <a href="timer.html#micros,Duration"><span class="Identifier">micros</span></a>, <a href="internal/asyncfutures.html#wait,Future[T]"><span class="Identifier">wait</span></a>, <a href="oserrno.html#EINPROGRESS"><span class="Identifier">EINPROGRESS</span></a>, <a href="oserrno.html#EPFNOSUPPORT"><span class="Identifier">EPFNOSUPPORT</span></a>, <a href="oserrno.html#E2BIG"><span class="Identifier">E2BIG</span></a>, <a href="timer.html#-=,Moment,Duration"><span class="Identifier">-=</span></a>, <a href="internal/asyncengine.html#runForever"><span class="Identifier">runForever</span></a>, <a href="oserrno.html#ENOMEDIUM"><span class="Identifier">ENOMEDIUM</span></a>, <a href="timer.html#secs,SomeIntegerI64"><span class="Identifier">secs</span></a>, <a href="futures.html#value,Future[T: not void]"><span class="Identifier">value</span></a>, <a href="internal/asyncfutures.html#read,Future[T: not void]"><span class="Identifier">read</span></a>, <a href="internal/asyncfutures.html#waitFor,Future[T: not void]"><span class="Identifier">waitFor</span></a>, <a href="oserrno.html#EL3HLT"><span class="Identifier">EL3HLT</span></a>, <a href="internal/asyncengine.html#unregisterAndCloseFd,AsyncFD"><span class="Identifier">unregisterAndCloseFd</span></a>, <a href="oserrno.html#EBADSLT"><span class="Identifier">EBADSLT</span></a>, <a href="internal/raisesfutures.html#InternalRaisesFuture"><span class="Identifier">InternalRaisesFuture</span></a>, <a href="timer.html#-,Duration,Duration"><span class="Identifier">-</span></a>, <a href="timer.html#<,Duration,Duration"><span class="Identifier">&lt;</span></a>, <a href="oserrno.html#ENETRESET"><span class="Identifier">ENETRESET</span></a>, <a href="timer.html#fastEpochTime"><span class="Identifier">fastEpochTime</span></a>, <a href="oserrno.html#ENXIO"><span class="Identifier">ENXIO</span></a>, <a href="timer.html#isZero,Duration"><span class="Identifier">isZero</span></a>, <a href="oserrno.html#EPIPE"><span class="Identifier">EPIPE</span></a>, <a href="internal/asyncfutures.html#allFutures,varargs[FutureBase]"><span class="Identifier">allFutures</span></a>, <a href="timer.html#Day"><span class="Identifier">Day</span></a>, <a href="internal/asyncfutures.html#wait,InternalRaisesFuture,SomeFuture"><span class="Identifier">wait</span></a>, <a href="timer.html#now,typedesc[Moment]"><span class="Identifier">now</span></a>, <a href="internal/asyncfutures.html#read,InternalRaisesFuture[void,E]"><span class="Identifier">read</span></a>, <a href="internal/asyncfutures.html#asyncSpawn,Future[void]"><span class="Identifier">asyncSpawn</span></a>, <a href="internal/asyncfutures.html#removeCallback,FutureBase,CallbackFunc,pointer"><span class="Identifier">removeCallback</span></a>, <a href="oserrno.html#EAGAIN"><span class="Identifier">EAGAIN</span></a>, <a href="internal/asyncengine.html#raiseOsDefect,OSErrorCode,string"><span class="Identifier">raiseOsDefect</span></a>, <a href="internal/asyncengine.html#trackerCounterKeys.i,PDispatcher"><span class="Identifier">trackerCounterKeys</span></a>, <a href="oserrno.html#EADDRNOTAVAIL"><span class="Identifier">EADDRNOTAVAIL</span></a>, <a href="internal/asyncfutures.html#read,InternalRaisesFuture[T: not void,E]"><span class="Identifier">read</span></a>, <a href="internal/asyncfutures.html#removeCallback,FutureBase,CallbackFunc"><span class="Identifier">removeCallback</span></a>, <a href="internal/asyncengine.html#TrackerCounter"><span class="Identifier">TrackerCounter</span></a>, <a href="internal/asyncmacro.html#async.m,untyped"><span class="Identifier">async</span></a>, <a href="internal/asyncfutures.html#addCallback,FutureBase,CallbackFunc"><span class="Identifier">addCallback</span></a>, <a href="internal/raisesfutures.html#init.t,typeInternalRaisesFuture[T,E],static[string],static[FutureFlags]"><span class="Identifier">init</span></a>, <a href="internal/asyncmacro.html#async.m,untyped,untyped"><span class="Identifier">async</span></a>, <a href="oserrno.html#EREMCHG"><span class="Identifier">EREMCHG</span></a>, <a href="futures.html#finished,FutureBase"><span class="Identifier">finished</span></a>, <a href="internal/asyncfutures.html#addCallback,FutureBase,CallbackFunc,pointer"><span class="Identifier">addCallback</span></a>, <a href="timer.html#seconds,SomeIntegerI64"><span class="Identifier">seconds</span></a>, <a href="internal/asyncfutures.html#noCancel,F"><span class="Identifier">noCancel</span></a>, <a href="timer.html#low.t,typedesc[Duration]"><span class="Identifier">low</span></a>, <a href="internal/asyncengine.html#AsyncFD"><span class="Identifier">AsyncFD</span></a>, <a href="oserrno.html#ECHILD"><span class="Identifier">ECHILD</span></a>, <a href="internal/raisesfutures.html#Raising.m,typedesc[Future[T]],typed"><span class="Identifier">Raising</span></a>, <a href="internal/raisesfutures.html#init.t,typeInternalRaisesFuture[T,E],static[string]"><span class="Identifier">init</span></a>, <a href="oserrno.html#ECONNABORTED"><span class="Identifier">ECONNABORTED</span></a>, <a href="futures.html#state,FutureBase"><span class="Identifier">state</span></a>, <a href="internal/asyncfutures.html#wait,InternalRaisesFuture"><span class="Identifier">wait</span></a>, <a href="timer.html#>,Moment,Moment"><span class="Identifier">&gt;</span></a>, <a href="internal/asyncengine.html#callIdle,InternalAsyncCallback"><span class="Identifier">callIdle</span></a>, <a href="internal/asyncengine.html#removeTimer,int64,CallbackFunc,pointer"><span class="Identifier">removeTimer</span></a>, <a href="internal/asyncfutures.html#LocCreateIndex.t"><span class="Identifier">LocCreateIndex</span></a>, <a href="internal/asyncengine.html#addReader2,AsyncFD,CallbackFunc,pointer"><span class="Identifier">addReader2</span></a>, <a href="oserrno.html#ETIME"><span class="Identifier">ETIME</span></a>, <a href="oserrno.html#ENOLCK"><span class="Identifier">ENOLCK</span></a>, <a href="oserrno.html#EDEADLK"><span class="Identifier">EDEADLK</span></a>, <a href="internal/asyncfutures.html#asyncCheck,Future[T]"><span class="Identifier">asyncCheck</span></a>, <a href="timer.html#Duration"><span class="Identifier">Duration</span></a>, <a href="oserrno.html#ELNRNG"><span class="Identifier">ELNRNG</span></a>, <a href="oserrno.html#EDOM"><span class="Identifier">EDOM</span></a>, <a href="oserrno.html#ENOCSI"><span class="Identifier">ENOCSI</span></a>, <a href="timer.html#millis,Duration"><span class="Identifier">millis</span></a>, <a href="oserrno.html#EBADE"><span class="Identifier">EBADE</span></a>, <a href="oserrno.html#EMEDIUMTYPE"><span class="Identifier">EMEDIUMTYPE</span></a>, <a href="internal/raisesfutures.html#readError,InternalRaisesFuture[T,void]"><span class="Identifier">readError</span></a>, <a href="internal/asyncfutures.html#sleepAsync,int"><span class="Identifier">sleepAsync</span></a>, <a href="timer.html#isInfinite,Duration"><span class="Identifier">isInfinite</span></a>, <a href="internal/asyncfutures.html#asyncDiscard,Future[T]"><span class="Identifier">asyncDiscard</span></a>, <a href="internal/asyncfutures.html#callback=,FutureBase,CallbackFunc"><span class="Identifier">callback=</span></a>, <a href="oserrno.html#ENETUNREACH"><span class="Identifier">ENETUNREACH</span></a>, <a href="futures.html#InternalFutureBase"><span class="Identifier">InternalFutureBase</span></a>, <a href="internal/asyncengine.html#callIdle,CallbackFunc,pointer"><span class="Identifier">callIdle</span></a>, <a href="oserrno.html#ENOSYS"><span class="Identifier">ENOSYS</span></a>, <a href="oserrno.html#ELIBSCN"><span class="Identifier">ELIBSCN</span></a>, <a href="oserrno.html#EIO"><span class="Identifier">EIO</span></a>, <a href="oserrno.html#EROFS"><span class="Identifier">EROFS</span></a>, <a href="timer.html#seconds,Duration"><span class="Identifier">seconds</span></a>, <a href="oserrno.html#ELIBMAX"><span class="Identifier">ELIBMAX</span></a>, <a href="timer.html#div,Duration,SomeIntegerI64"><span class="Identifier">div</span></a>, <a href="futures.html#init.t,typeFuture[T],static[string]"><span class="Identifier">init</span></a>, <a href="oserrno.html#EL2HLT"><span class="Identifier">EL2HLT</span></a>, <a href="oserrno.html#EOPNOTSUPP"><span class="Identifier">EOPNOTSUPP</span></a>, <a href="internal/asyncfutures.html#FutureStr"><span class="Identifier">FutureStr</span></a>, <a href="internal/asyncengine.html#poll"><span class="Identifier">poll</span></a>, <a href="internal/asyncfutures.html#oneIndex,varargs[Future[T]]"><span class="Identifier">oneIndex</span></a>, <a href="internal/asyncengine.html#clearTimer,TimerCallback"><span class="Identifier">clearTimer</span></a>, <a href="internal/asyncengine.html#register2,AsyncFD"><span class="Identifier">register2</span></a>, <a href="internal/asyncfutures.html#LocCompleteIndex.t"><span class="Identifier">LocCompleteIndex</span></a>, <a href="timer.html#days,Duration"><span class="Identifier">days</span></a>, <a href="oserrno.html#ENOSTR"><span class="Identifier">ENOSTR</span></a>, <a href="oserrno.html#EADDRINUSE"><span class="Identifier">EADDRINUSE</span></a>, <a href="internal/asyncfutures.html#one,openArray[F]"><span class="Identifier">one</span></a>, <a href="internal/asyncfutures.html#sleepAsync,Duration"><span class="Identifier">sleepAsync</span></a>, <a href="oserrno.html#ENAMETOOLONG"><span class="Identifier">ENAMETOOLONG</span></a>, <a href="oserrno.html#EMULTIHOP"><span class="Identifier">EMULTIHOP</span></a>, <a href="oserrno.html#ESTALE"><span class="Identifier">ESTALE</span></a>, <a href="internal/asyncfutures.html#race,FutureBase,varargs[FutureBase]"><span class="Identifier">race</span></a>, <a href="oserrno.html#ENODATA"><span class="Identifier">ENODATA</span></a>, <a href="oserrno.html#EFBIG"><span class="Identifier">EFBIG</span></a>, <a href="timer.html#+,Duration,Moment"><span class="Identifier">+</span></a>, <a href="timer.html#minutes,Duration"><span class="Identifier">minutes</span></a>, <a href="oserrno.html#ERFKILL"><span class="Identifier">ERFKILL</span></a>, <a href="futures.html#cancelled,FutureBase"><span class="Identifier">cancelled</span></a>, <a href="timer.html#$,Moment"><span class="Identifier">$</span></a>, <a href="internal/asyncengine.html#toException,OSErrorCode"><span class="Identifier">toException</span></a>, <a href="internal/asyncfutures.html#join,FutureBase"><span class="Identifier">join</span></a>, <a href="oserrno.html#EDEADLOCK"><span class="Identifier">EDEADLOCK</span></a>, <a href="internal/asyncfutures.html#allFutures,varargs[InternalRaisesFuture[T,E]]"><span class="Identifier">allFutures</span></a>, <a href="internal/asyncengine.html#MaxEventsCount"><span class="Identifier">MaxEventsCount</span></a>, <a href="internal/asyncfutures.html#wait,Future[T],SomeFuture"><span class="Identifier">wait</span></a>, <a href="internal/asyncfutures.html#read,Future[void]"><span class="Identifier">read</span></a>, <a href="internal/asyncengine.html#raiseAsDefect,ref.Exception,string"><span class="Identifier">raiseAsDefect</span></a>, <a href="oserrno.html#ENOSPC"><span class="Identifier">ENOSPC</span></a>, <a href="timer.html#Millisecond"><span class="Identifier">Millisecond</span></a>, <a href="timer.html#>,Duration,Duration"><span class="Identifier">&gt;</span></a>, <a href="internal/asyncengine.html#setTimer,Moment,CallbackFunc,pointer"><span class="Identifier">setTimer</span></a>, <a href="internal/asyncfutures.html#cancelSoon.t,FutureBase,CallbackFunc,pointer"><span class="Identifier">cancelSoon</span></a>, <a href="internal/asyncengine.html#unregister2,AsyncFD"><span class="Identifier">unregister2</span></a>, <a href="futures.html#failed.t,typeFuture[T],ref.CatchableError,static[string]"><span class="Identifier">failed</span></a>, <a href="internal/asyncfutures.html#waitFor,InternalRaisesFuture[void,E]"><span class="Identifier">waitFor</span></a>, <a href="internal/asyncfutures.html#newFutureSeq.t,static[string]"><span class="Identifier">newFutureSeq</span></a>, <a href="internal/asyncengine.html#addTracker,string,T"><span class="Identifier">addTracker</span></a>, <a href="internal/asyncfutures.html#callback=,FutureBase,CallbackFunc,pointer"><span class="Identifier">callback=</span></a>, <a href="internal/asyncfutures.html#orImpl.t,Future[T],Future[Y]"><span class="Identifier">orImpl</span></a>, <a href="oserrno.html#ECONNREFUSED"><span class="Identifier">ECONNREFUSED</span></a>, <a href="timer.html#high.t,typedesc[Moment]"><span class="Identifier">high</span></a>, <a href="oserrno.html#ENOTNAM"><span class="Identifier">ENOTNAM</span></a>, <a href="timer.html#nanos,SomeIntegerI64"><span class="Identifier">nanos</span></a>, <a href="internal/asyncengine.html#addWriter2,AsyncFD,CallbackFunc,pointer"><span class="Identifier">addWriter2</span></a>, <a href="internal/asyncengine.html#removeTimer,uint64,CallbackFunc,pointer"><span class="Identifier">removeTimer</span></a>, <a href="internal/asyncengine.html#internalCallTick,CallbackFunc,pointer"><span class="Identifier">internalCallTick</span></a>, <a href="oserrno.html#EINTR"><span class="Identifier">EINTR</span></a>, <a href="internal/asyncfutures.html#and,Future[T],Future[Y]"><span class="Identifier">and</span></a>, <a href="internal/asyncengine.html#closeHandle,AsyncFD,CallbackFunc"><span class="Identifier">closeHandle</span></a>, <a href="oserrno.html#EL3RST"><span class="Identifier">EL3RST</span></a>, <a href="internal/asyncfutures.html#readError,FutureBase"><span class="Identifier">readError</span></a>, <a href="timer.html#*,Duration,SomeIntegerI64"><span class="Identifier">*</span></a>, <a href="internal/asyncfutures.html#newFuture.t,static[string],static[FutureFlags]"><span class="Identifier">newFuture</span></a>, <a href="internal/asyncengine.html#internalCallTick,CallbackFunc"><span class="Identifier">internalCallTick</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>