Skip to content

Commit

Permalink
deploy: d8f0c4f
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Aug 12, 2024
1 parent 7eecd22 commit 55c275a
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 52 deletions.
2 changes: 1 addition & 1 deletion atomics.html
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,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: 2024-07-25 20:05:40 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-08-12 19:16:06 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion barrier.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,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: 2024-07-25 20:05:30 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-08-12 19:15:56 UTC</small>
</div>
</div>
</div>
Expand Down
73 changes: 45 additions & 28 deletions channels.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ <h1 class="title">threading/channels</h1>
<ul class="simple nested-toc-section">=destroy
<li><a class="reference" href="#%3Ddestroy%2CChan%5BT%5D" title="`=destroy`[T](c: Chan[T])">`=destroy`[T](c: Chan[T])</a></li>

</ul>
<ul class="simple nested-toc-section">=dup
<li><a class="reference" href="#%3Ddup%2CChan%5BT%5D" title="`=dup`[T](src: Chan[T]): Chan[T]">`=dup`[T](src: Chan[T]): Chan[T]</a></li>

</ul>
<ul class="simple nested-toc-section">newChan
<li><a class="reference" href="#newChan%2CPositive" title="newChan[T](elements: Positive = 30): Chan[T]">newChan[T](elements: Positive = 30): Chan[T]</a></li>
Expand Down Expand Up @@ -217,8 +221,8 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
<dd>

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

</dd>
</div>
Expand All @@ -234,8 +238,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#L284" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L284" 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 @@ -247,8 +251,21 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<dd>


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

</dd>
</div>

</div>
<div id="=dup-procs-all">
<div id="=dup,Chan[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#%3Ddup%2CChan%5BT%5D"><span class="Identifier">`=dup`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">src</span><span class="Other">:</span> <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="Other">:</span> <a href="channels.html#Chan"><span class="Identifier">Chan</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span></pre></dt>
<dd>


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

</dd>
</div>
Expand All @@ -262,21 +279,21 @@ <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#L372" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L372" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L367" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L367" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>

</div>
<div id="peek-procs-all">
<div id="peek,Chan[T]">
<dt><pre><span class="Keyword">func</span> <a href="#peek%2CChan%5BT%5D"><span class="Identifier">peek</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <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="Other">:</span> <span class="Identifier">int</span> {.<span class="Identifier">inline</span>.}</pre></dt>
<dt><pre><span class="Keyword">proc</span> <a href="#peek%2CChan%5BT%5D"><span class="Identifier">peek</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <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="Other">:</span> <span class="Identifier">int</span> {.<span class="Identifier">inline</span>.}</pre></dt>
<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#L368" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L368" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L363" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L363" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -288,8 +305,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#L356" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L356" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<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;

</dd>
</div>
Expand All @@ -301,8 +318,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#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#L342" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L342" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -314,8 +331,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#L361" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L361" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L356" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L356" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -330,8 +347,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#L329" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L329" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L324" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L324" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -348,8 +365,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#L316" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L316" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L311" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L311" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -366,8 +383,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#L293" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L293" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L288" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L288" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -385,8 +402,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#L343" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L343" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L338" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L338" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -398,8 +415,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#L312" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L312" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/tree/master/threading/channels.nim#L307" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/threading/edit/devel/threading/channels.nim#L307" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;

</dd>
</div>
Expand All @@ -415,7 +432,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: 2024-07-25 20:05:34 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-08-12 19:16:00 UTC</small>
</div>
</div>
</div>
Expand Down
29 changes: 15 additions & 14 deletions channels.idx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
nimTitle channels channels.html module threading/channels 0
nim Chan channels.html#Chan object Chan 266
nim `=destroy` channels.html#=destroy,Chan[T] proc `=destroy`[T](c: Chan[T]) 278
nim `=copy` channels.html#=copy,Chan[T],Chan[T] proc `=copy`[T](dest: var Chan[T]; src: Chan[T]) 284
nim trySend channels.html#trySend,Chan[T],sinkIsolated[T] proc trySend[T](c: Chan[T]; src: sink Isolated[T]): bool 293
nim trySend channels.html#trySend.t,Chan[T],T template trySend[T](c: Chan[T]; src: T): bool 312
nim tryRecv channels.html#tryRecv,Chan[T],T proc tryRecv[T](c: Chan[T]; dst: var T): bool 316
nim send channels.html#send,Chan[T],sinkIsolated[T] proc send[T](c: Chan[T]; src: sink Isolated[T]) 329
nim send channels.html#send.t,Chan[T],T template send[T](c: Chan[T]; src: T) 343
nim recv channels.html#recv,Chan[T],T proc recv[T](c: Chan[T]; dst: var T) 347
nim recv channels.html#recv,Chan[T] proc recv[T](c: Chan[T]): T 356
nim recvIso channels.html#recvIso,Chan[T] proc recvIso[T](c: Chan[T]): Isolated[T] 361
nim peek channels.html#peek,Chan[T] proc peek[T](c: Chan[T]): int 368
nim newChan channels.html#newChan,Positive proc newChan[T](elements: Positive = 30): Chan[T] 372
nimgrp recv channels.html#recv-procs-all proc 347
nim Chan channels.html#Chan object Chan 258
nim `=destroy` channels.html#=destroy,Chan[T] proc `=destroy`[T](c: Chan[T]) 270
nim `=dup` channels.html#=dup,Chan[T] proc `=dup`[T](src: Chan[T]): Chan[T] 276
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 288
nim trySend channels.html#trySend.t,Chan[T],T template trySend[T](c: Chan[T]; src: T): bool 307
nim tryRecv channels.html#tryRecv,Chan[T],T proc tryRecv[T](c: Chan[T]; dst: var T): bool 311
nim send channels.html#send,Chan[T],sinkIsolated[T] proc send[T](c: Chan[T]; src: sink Isolated[T]) 324
nim send channels.html#send.t,Chan[T],T template send[T](c: Chan[T]; src: T) 338
nim recv channels.html#recv,Chan[T],T proc recv[T](c: Chan[T]; dst: var T) 342
nim recv channels.html#recv,Chan[T] proc recv[T](c: Chan[T]): T 351
nim recvIso channels.html#recvIso,Chan[T] proc recvIso[T](c: Chan[T]): Isolated[T] 356
nim peek channels.html#peek,Chan[T] proc peek[T](c: Chan[T]): int 363
nim newChan channels.html#newChan,Positive proc newChan[T](elements: Positive = 30): Chan[T] 367
nimgrp recv channels.html#recv-procs-all proc 342
2 changes: 1 addition & 1 deletion dochack.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ function then__dochack_u1099(future_p0, onSuccess_p1, onReject_p2) {

BeforeRet: {
var ret_536872027 = null;
ret_536872027 = future_p0.then(onSuccess_p1, onReject_p2)
ret_536872027 = future_p0.then(onSuccess_p1, onReject_p2);
result_536872017 = ret_536872027;
break BeforeRet;
};
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ <h1 class="title">Index</h1>
</ul></dd>
<dt><a name="%60%3Ddup%60" href="#%60%3Ddup%60"><span>`=dup`:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="channels: proc `=dup`[T](src: Chan[T]): Chan[T]" href="channels.html#%3Ddup%2CChan%5BT%5D">channels: proc `=dup`[T](src: Chan[T]): Chan[T]</a></li>
<li><a class="reference external"
data-doc-search-tag="smartptrs: proc `=dup`[T](src: SharedPtr[T]): SharedPtr[T]" href="smartptrs.html#%3Ddup%2CSharedPtr%5BT%5D">smartptrs: proc `=dup`[T](src: SharedPtr[T]): SharedPtr[T]</a></li>
<li><a class="reference external"
data-doc-search-tag="smartptrs: proc `=dup`[T](src: UniquePtr[T]): UniquePtr[T]" href="smartptrs.html#%3Ddup%2CUniquePtr%5BT%5D">smartptrs: proc `=dup`[T](src: UniquePtr[T]): UniquePtr[T]</a></li>
Expand Down Expand Up @@ -364,7 +366,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: 2024-07-25 20:05:41 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2024-08-12 19:16:07 UTC</small>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 55c275a

Please sign in to comment.