Skip to content

Commit f05a83b

Browse files
committed
Updates to March 22th
1 parent daff7f3 commit f05a83b

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

js/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//DO NOT EDIT generated by /home/jmerelo/Code/raku/raku-doc-generated/site#sources/677E0B857640AD7C699D43EAFA5F9550AE91E0B5 (Documentable::DocPage::Factory):138
1+
//DO NOT EDIT generated by /home/jmerelo/Code/raku/my-raku-examples/site#sources/677E0B857640AD7C699D43EAFA5F9550AE91E0B5 (Documentable::DocPage::Factory):138
22
var current_search = "";
33

44
$(function(){

language/modules-core.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ <h1 class="title">Core modules</h1>
6969
<tr class="toc-level-2"><td class="toc-number">0.1</td><td class="toc-text"><a href="#CompUnit::*_modules_and_roles"><code class="pod-code-inline">CompUnit::*</code> modules and roles </a></td></tr>
7070
<tr class="toc-level-2"><td class="toc-number">0.2</td><td class="toc-text"><a href="#NativeCall_modules"><code class="pod-code-inline">NativeCall</code> modules</a></td></tr>
7171
<tr class="toc-level-2"><td class="toc-number">0.3</td><td class="toc-text"><a href="#Other_modules">Other modules</a></td></tr>
72-
72+
7373
</table>
7474
</nav>
7575

7676
<div class="pod-body ">
77-
<p>The Rakudo implementation has a few modules included you may want to use. The following is a list of them, along with links to their source code.</p>
77+
<p>The Rakudo implementation has a few modules included you may want to use; please note that the implementation is not part of the Raku specification and thus might be subject to change without prior notice. The following is a list of them, along with links to their source code.</p>
7878
<h2 id="CompUnit::*_modules_and_roles"><a class="u" href="#___top" title="go to top of document"><code>CompUnit::*</code> modules and roles <a name="index-entry-CompUnit_(Rakudo_classes)"></a></a></h2>
7979
<p>These modules are mostly used by distribution build tools, and are not intended to be used (at least until version 6.c) by the final user.</p>
8080
<ul><li><p><a href="https://github.com/rakudo/rakudo/blob/master/lib/CompUnit/Repository/Staging.rakumod"><code>CompUnit::Repository::Staging</code></a>.</p>
@@ -95,9 +95,10 @@ <h2 id="NativeCall_modules"><a class="u" href="#___top" title="go to top of docu
9595
<h2 id="Other_modules"><a class="u" href="#___top" title="go to top of document">Other modules</a></h2>
9696
<ul><li><p><a href="https://github.com/rakudo/rakudo/blob/master/lib/Pod/To/Text.rakumod"><code>Pod::To::Text</code></a> Used by several external modules</p>
9797
</li>
98-
<li><p><a href="https://github.com/rakudo/rakudo/blob/master/lib/Test.rakumod"><code>Test</code></a> Test routines (<a href="/language/testing">docs</a>)</p>
98+
<li><p><a href="/type/Test"><code>Test</code></a> Test routines (see <a href="/language/testing">tutorial</a>)</p>
9999
</li>
100-
<li><p><a href="https://github.com/rakudo/rakudo/blob/master/lib/experimental.rakumod"><code>experimental</code></a></p>
100+
<li><p><a href="https://github
101+
.com/rakudo/rakudo/blob/master/lib/experimental.rakumod"><code>experimental</code></a> (<a href="/language/pragmas#index-entry-experimental__pragma">documentation</a>)</p>
101102
</li>
102103
<li><p><a href="https://github.com/rakudo/rakudo/blob/master/lib/newline.rakumod"><code>newline</code></a></p>
103104
</li>

language/subscripts.html

Lines changed: 4 additions & 3 deletions
Large diffs are not rendered by default.

routine/STORE.html

Lines changed: 4 additions & 3 deletions
Large diffs are not rendered by default.

routine/with-lock-hidden-from-recursion-check.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ <h1 id="class_Lock::Async"><a class="u" href="#___top" title="go to top of docum
8585
<p>From <a href="/type/Lock::Async#method_with-lock-hidden-from-recursion-check">Lock::Async</a></p>
8686
<h2 id="(Lock::Async)_method_with-lock-hidden-from-recursion-check"><a href="/type/Lock::Async#method_with-lock-hidden-from-recursion-check">(Lock::Async) method with-lock-hidden-from-recursion-check</a></h2>
8787
<p>Defined as:</p>
88-
<pre class="editor editor-colors"><div class="line"><span class="source raku"><span class="storage type declarator type raku"><span>method</span></span><span>&nbsp;</span><span class="entity name function raku"><span>with-lock-hidden-from-recursion-check</span></span><span>(</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>&amp;</span></span><span class="variable other identifier raku"><span>code</span></span></span><span>)</span></span></div></pre><p>Temporarily resets the Lock::Async recursion list so that it no longer includes the lock this method is called on and runs the given <code>&amp;code</code> immediately if the call to the method occurred in a caller chain where <a href="/type/Lock::Async/#method_protect-or-queue-on-recursion">protect-or-queue-on-recursion</a> has already been called and the lock has been placed on the recursion list.</p>
88+
<pre class="editor editor-colors"><div class="line"><span class="source raku"><span class="storage type declarator type raku"><span>method</span></span><span>&nbsp;</span><span class="entity name function raku"><span>with-lock-hidden-from-recursion-check</span></span><span>(</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>&amp;</span></span><span class="variable other identifier raku"><span>code</span></span></span><span>)</span></span></div></pre><p>Temporarily resets the Lock::Async recursion list so that it no longer includes the lock this method is called on and runs the given <code>&amp;code</code> immediately if the call to the method occurred in a caller chain where <a href="/type/Lock::Async#method_protect-or-queue-on-recursion">protect-or-queue-on-recursion</a> has already been called and the lock has been placed on the recursion list.</p>
8989
<pre class="editor editor-colors"><div class="line"><span class="source raku"><span class="storage modifier declarator raku"><span>my</span></span><span>&nbsp;</span><span class="support type raku"><span>Lock</span></span><span>::</span><span class="routine name raku"><span>Async</span></span><span>&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>lock</span></span></span><span>&nbsp;</span><span class="storage modifier assignment raku"><span>.=</span></span><span>&nbsp;</span><span class="support function raku"><span>new</span></span><span>;</span></span></div><div class="line"><span class="source raku"><span class="storage modifier declarator raku"><span>my</span></span><span>&nbsp;</span><span class="support type raku"><span>Int</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>count</span></span></span><span>&nbsp;</span><span class="storage modifier assignment raku"><span>=</span></span><span>&nbsp;</span><span class="constant numeric raku"><span>0</span></span><span>;</span></span></div><div class="line"><span class="source raku"><span>&nbsp;</span></span></div><div class="line"><span class="source raku"><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>lock</span></span></span><span class="keyword operator generic raku"><span>.</span></span><span class="routine name raku"><span>protect-or-queue-on-recursion</span></span><span>(</span><span class="meta block raku"><span class="punctuation definition block raku"><span>{</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage modifier declarator raku"><span>my</span></span><span>&nbsp;</span><span class="support type raku"><span>Int</span></span><span>&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>count</span></span></span><span>&nbsp;</span><span class="storage modifier assignment raku"><span>=</span></span><span>&nbsp;</span><span class="constant numeric raku"><span>0</span></span><span>;</span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;</span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="punctuation whitespace comment leading raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line number-sign raku"><span class="punctuation definition comment raku"><span>#</span></span><span>&nbsp;Runs&nbsp;instantly.</span><span>&nbsp;</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>lock</span></span></span><span class="keyword operator generic raku"><span>.</span></span><span class="routine name raku"><span>with-lock-hidden-from-recursion-check</span></span><span>(</span><span class="meta block raku"><span class="punctuation definition block raku"><span>{</span></span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>count</span></span></span><span class="keyword operator multi-symbol raku"><span>++</span></span><span>;</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition block raku"><span>}</span></span></span><span>);</span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;</span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="punctuation whitespace comment leading raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line number-sign raku"><span class="punctuation definition comment raku"><span>#</span></span><span>&nbsp;Runs&nbsp;after&nbsp;the&nbsp;outer&nbsp;caller&#39;s&nbsp;protect-or-queue-on-recursion&nbsp;call&nbsp;has</span><span>&nbsp;</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="punctuation whitespace comment leading raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line number-sign raku"><span class="punctuation definition comment raku"><span>#</span></span><span>&nbsp;finished&nbsp;running.</span><span>&nbsp;</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>lock</span></span></span><span class="keyword operator generic raku"><span>.</span></span><span class="routine name raku"><span>protect-or-queue-on-recursion</span></span><span>(</span><span class="meta block raku"><span class="punctuation definition block raku"><span>{</span></span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>count</span></span></span><span class="keyword operator multi-symbol raku"><span>++</span></span><span>;</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition block raku"><span>}</span></span></span><span>)</span><span class="keyword operator generic raku"><span>.</span></span><span class="routine name raku"><span>then</span></span><span>(</span><span class="meta block raku"><span class="punctuation definition block raku"><span>{</span></span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="support function raku"><span>say</span></span><span>&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>count</span></span></span><span>;&nbsp;</span><span class="comment line number-sign raku"><span class="punctuation definition comment raku"><span>#</span></span><span>&nbsp;OUTPUT:&nbsp;2</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition block raku"><span>}</span></span></span><span>);</span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;</span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="support function raku"><span>say</span></span><span>&nbsp;</span><span class="meta variable container raku"><span class="variable other identifier sigil raku"><span>$</span></span><span class="variable other identifier raku"><span>count</span></span></span><span>;&nbsp;</span><span class="comment line number-sign raku"><span class="punctuation definition comment raku"><span>#</span></span><span>&nbsp;OUTPUT:&nbsp;1</span><span>&nbsp;</span></span></span></span></div><div class="line"><span class="source raku"><span class="meta block raku"><span class="punctuation definition block raku"><span>}</span></span></span><span>);</span></span></div></pre>
9090
</div>
9191
</div>

type/Lock.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h1 class="title">class Lock</h1>
7171
<nav class="indexgroup">
7272
<table id="TOC">
7373
<caption><h2 id="TOC_Title">Table of Contents</h2></caption>
74-
<tr class="toc-level-1"><td class="toc-number">1</td><td class="toc-text"><a href="#Methods">Methods</a></td></tr>
74+
<tr class="toc-level-1"><td class="toc-number">1</td><td class="toc-text"><a href="#Methods">Methods</a></td></tr>
7575
<tr class="toc-level-2"><td class="toc-number">1.1</td><td class="toc-text"><a href="#method_protect">method protect</a></td></tr>
7676
<tr class="toc-level-2"><td class="toc-number">1.2</td><td class="toc-text"><a href="#method_lock">method lock</a></td></tr>
7777
<tr class="toc-level-2"><td class="toc-number">1.3</td><td class="toc-text"><a href="#method_unlock">method unlock</a></td></tr>
@@ -89,7 +89,7 @@ <h1 class="title">class Lock</h1>
8989
<p>It&#39;s important to understand that there is no direct connection between a <code>Lock</code> and any particular piece of data; it is up to the programmer to ensure that the <code>Lock</code> is held during all operations that involve the data in question. The <code>OO::Monitors</code> module, while not a complete solution to this problem, does provide a way to avoid dealing with the lock explicitly and encourage a more structured approach.</p>
9090
<p>The <code>Lock</code> class is backed by operating-system provided constructs, and so a thread that is waiting to acquire a lock is, from the point of view of the operating system, blocked.</p>
9191
<p>Code using high-level Raku concurrency constructs should avoid using <code>Lock</code>. Waiting to acquire a <code>Lock</code> blocks a real <code>Thread</code>, meaning that the thread pool (used by numerous higher-level Raku concurrency mechanisms) cannot use that thread in the meantime for anything else.</p>
92-
<p>Any <code>await</code> performed while a <code>Lock</code> is held will behave in a blocking manner; the standard non-blocking behavior of <code>await</code> relies on the code following the `await` resuming on a different <code>Thread</code> from the pool, which is incompatible with the requirement that a <code>Lock</code> be unlocked by the same thread that locked it. See <a href="/type/Lock::Async">Lock::Async</a> for an alternative mechanism that does not have this shortcoming.</p>
92+
<p>Any <code>await</code> performed while a <code>Lock</code> is held will behave in a blocking manner; the standard non-blocking behavior of <code>await</code> relies on the code following the `await` resuming on a different <code>Thread</code> from the pool, which is incompatible with the requirement that a <code>Lock</code> be unlocked by the same thread that locked it. See <a href="/type/Lock::Async">Lock::Async</a> for an alternative mechanism that does not have this shortcoming. Other than that, the main difference is that <code>Lock</code> mainly maps to operating system mechanisms, while <code>Lock::Async</code> uses Raku primitives to achieve similar effects. If you&#39;re doing low-level stuff (native bindings) and/or actually want to block real OS threads, use <code>Lock</code>. However, if you want a non-blocking mutual exclusion and don&#39;t need recursion and are running code on the Raku thread pool, use Lock::Async.</p>
9393
<p>By their nature, <code>Lock</code>s are not composable, and it is possible to end up with hangs should circular dependencies on locks occur. Prefer to structure concurrent programs such that they communicate results rather than modify shared data structures, using mechanisms like <a href="/type/Promise">Promise</a>, <a href="/type/Channel">Channel</a> and <a href="/type/Supply">Supply</a>.</p>
9494
<h1 id="Methods"><a class="u" href="#___top" title="go to top of document">Methods</a></h1>
9595
<h2 id="method_protect"><a class="u" href="#___top" title="go to top of document">method protect</a></h2>

0 commit comments

Comments
 (0)