Skip to content

Commit

Permalink
deploy: dd68ccd
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Jan 13, 2024
1 parent 771cc29 commit ae8227f
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 55 deletions.
2 changes: 1 addition & 1 deletion atomics.html
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-12-16 08:48:27 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-01-13 11:00:26 UTC</small>
</div>
</div>
</div>
Expand Down
68 changes: 38 additions & 30 deletions channels.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ <h1 class="title">threading/channels</h1>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
Expand Down Expand Up @@ -196,17 +199,22 @@ <h1 class="title">threading/channels</h1>
<span class="Identifier">assert</span> <span class="Identifier">messages</span><span class="Punctuation">[</span><span class="Operator">^</span><span class="DecNumber">1</span><span class="Punctuation">]</span> <span class="Operator">==</span> <span class="StringLit">&quot;Another message&quot;</span>
<span class="Comment"># At least one non-successful attempt to receive the message had to occur.</span>
<span class="Identifier">assert</span> <span class="Identifier">messages</span><span class="Operator">.</span><span class="Identifier">len</span> <span class="Operator">&gt;=</span> <span class="DecNumber">2</span></pre></p>
<div class="section" id="7">
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="atomics.html">atomics</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="Chan">
<dt><pre><a href="channels.html#Chan"><span class="Identifier">Chan</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span>
</pre></dt>
<dt><pre><a href="channels.html#Chan"><span class="Identifier">Chan</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
<dd>

Typed channel
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L243" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L243" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L261" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L261" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -222,8 +230,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<dd>

Shares <tt class="docutils literal"><span class="pre"><span class="Identifier">Channel</span></span></tt> by reference counting.
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L263" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L263" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L281" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L281" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -235,8 +243,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<dd>


<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L247" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L247" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L265" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L265" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -250,8 +258,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<p>An initialization procedure, necessary for acquiring resources and initializing internal state of the channel.</p>
<p><tt class="docutils literal"><span class="pre"><span class="Identifier">elements</span></span></tt> is the capacity of the channel and thus how many messages it can hold before it refuses to accept any further messages.</p>

<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L351" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L351" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L369" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L369" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -263,8 +271,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<dd>

Returns an estimation of the current number of messages held by the channel.
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L347" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L347" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L365" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L365" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -276,8 +284,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<dd>

Receives a message from the channel. A version of <a class="reference internal nimdoc" title="proc recv (2 overloads)" href="#recv-procs-all">recv</a> that returns the message.
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L335" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L335" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L353" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L353" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -289,8 +297,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<p>This blocks the receiving thread until a message was successfully received.</p>
<p>If the channel does not contain any messages this will block the thread until a message get sent to the channel.</p>

<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L326" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L326" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L344" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L344" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -302,8 +310,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<dd>

Receives a message from the channel. A version of <a class="reference internal nimdoc" title="proc recv (2 overloads)" href="#recv-procs-all">recv</a> that returns the message and isolates it.
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L340" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L340" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L358" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L358" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -318,8 +326,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<p>The memory of <tt class="docutils literal"><span class="pre"><span class="Identifier">src</span></span></tt> is moved, not copied.</p>
<p>If the channel is already full with messages this will block the thread until messages from the channel are removed.</p>

<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L308" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L308" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L326" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L326" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -336,8 +344,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
Blocking is still possible if another thread uses the blocking version of the <a class="reference internal nimdoc" title="proc send[T](c: Chan[T]; src: sink Isolated[T])" href="#send,Chan[T],sinkIsolated[T]">send proc</a> / <a class="reference internal nimdoc" title="proc recv (2 overloads)" href="#recv-procs-all">recv proc</a> and waits for the data/space to appear in the channel, thus holding the internal lock to channel's buffer.</div>
<p>Returns <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt> and does not change <tt class="docutils literal"><span class="pre"><span class="Identifier">dist</span></span></tt> if no message was received.</p>

<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L295" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L295" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L313" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L313" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -354,8 +362,8 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
Blocking is still possible if another thread uses the blocking version of the <a class="reference internal nimdoc" title="proc send[T](c: Chan[T]; src: sink Isolated[T])" href="#send,Chan[T],sinkIsolated[T]">send proc</a> / <a class="reference internal nimdoc" title="proc recv (2 overloads)" href="#recv-procs-all">recv proc</a> and waits for the data/space to appear in the channel, thus holding the internal lock to channel's buffer.</div>
<p>Returns <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt> if the message was not sent because the number of pending messages in the channel exceeded its capacity.</p>

<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L272" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L272" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L290" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L290" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -373,8 +381,8 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
<dd>

Helper template for <tt class="docutils literal"><span class="pre"><span class="Identifier">send</span></span></tt>.
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L322" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L322" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L340" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L340" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -386,8 +394,8 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
<dd>

Helper template for <a class="reference external" href="#trySend,Chan[T],sinkIsolated[T]">trySend</a>.
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L291" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L291" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L309" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L309" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -403,7 +411,7 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-12-16 08:48:26 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-01-13 11:00:25 UTC</small>
</div>
</div>
</div>
Expand Down
28 changes: 14 additions & 14 deletions channels.idx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
nimTitle channels channels.html module threading/channels 0
nim Chan channels.html#Chan object Chan 243
nim `=destroy` channels.html#=destroy,Chan[T] proc `=destroy`[T](c: Chan[T]) 247
nim `=copy` channels.html#=copy,Chan[T],Chan[T] proc `=copy`[T](dest: var Chan[T]; src: Chan[T]) 263
nim trySend channels.html#trySend,Chan[T],sinkIsolated[T] proc trySend[T](c: Chan[T]; src: sink Isolated[T]): bool 272
nim trySend channels.html#trySend.t,Chan[T],T template trySend[T](c: Chan[T]; src: T): bool 291
nim tryRecv channels.html#tryRecv,Chan[T],T proc tryRecv[T](c: Chan[T]; dst: var T): bool 295
nim send channels.html#send,Chan[T],sinkIsolated[T] proc send[T](c: Chan[T]; src: sink Isolated[T]) 308
nim send channels.html#send.t,Chan[T],T template send[T](c: Chan[T]; src: T) 322
nim recv channels.html#recv,Chan[T],T proc recv[T](c: Chan[T]; dst: var T) 326
nim recv channels.html#recv,Chan[T] proc recv[T](c: Chan[T]): T 335
nim recvIso channels.html#recvIso,Chan[T] proc recvIso[T](c: Chan[T]): Isolated[T] 340
nim peek channels.html#peek,Chan[T] proc peek[T](c: Chan[T]): int 347
nim newChan channels.html#newChan,Positive proc newChan[T](elements: Positive = 30): Chan[T] 351
nimgrp recv channels.html#recv-procs-all proc 326
nim Chan channels.html#Chan object Chan 261
nim `=destroy` channels.html#=destroy,Chan[T] proc `=destroy`[T](c: Chan[T]) 265
nim `=copy` channels.html#=copy,Chan[T],Chan[T] proc `=copy`[T](dest: var Chan[T]; src: Chan[T]) 281
nim trySend channels.html#trySend,Chan[T],sinkIsolated[T] proc trySend[T](c: Chan[T]; src: sink Isolated[T]): bool 290
nim trySend channels.html#trySend.t,Chan[T],T template trySend[T](c: Chan[T]; src: T): bool 309
nim tryRecv channels.html#tryRecv,Chan[T],T proc tryRecv[T](c: Chan[T]; dst: var T): bool 313
nim send channels.html#send,Chan[T],sinkIsolated[T] proc send[T](c: Chan[T]; src: sink Isolated[T]) 326
nim send channels.html#send.t,Chan[T],T template send[T](c: Chan[T]; src: T) 340
nim recv channels.html#recv,Chan[T],T proc recv[T](c: Chan[T]; dst: var T) 344
nim recv channels.html#recv,Chan[T] proc recv[T](c: Chan[T]): T 353
nim recvIso channels.html#recvIso,Chan[T] proc recvIso[T](c: Chan[T]): Isolated[T] 358
nim peek channels.html#peek,Chan[T] proc peek[T](c: Chan[T]): int 365
nim newChan channels.html#newChan,Positive proc newChan[T](elements: Positive = 30): Chan[T] 369
nimgrp recv channels.html#recv-procs-all proc 344
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h1 class="title">Index</h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-12-16 08:48:28 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-01-13 11:00:27 UTC</small>
</div>
</div>
</div>
Expand Down
8 changes: 3 additions & 5 deletions smartptrs.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
</dd>
</div>
<div id="SharedPtr">
<dt><pre><a href="smartptrs.html#SharedPtr"><span class="Identifier">SharedPtr</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span>
</pre></dt>
<dt><pre><a href="smartptrs.html#SharedPtr"><span class="Identifier">SharedPtr</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
<dd>

Shared ownership reference counting pointer.
Expand All @@ -189,8 +188,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
</dd>
</div>
<div id="UniquePtr">
<dt><pre><a href="smartptrs.html#UniquePtr"><span class="Identifier">UniquePtr</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span>
</pre></dt>
<dt><pre><a href="smartptrs.html#UniquePtr"><span class="Identifier">UniquePtr</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
<dd>

Non copyable pointer to a value of type <tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt> with exclusive ownership.
Expand Down Expand Up @@ -543,7 +541,7 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-12-16 08:48:27 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-01-13 11:00:26 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion theindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h1 class="title">Index</h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-12-16 08:48:28 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-01-13 11:00:27 UTC</small>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit ae8227f

Please sign in to comment.