Skip to content

Commit

Permalink
Deploying to gh-pages from @ 70bdb8a 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cgay committed Nov 22, 2024
1 parent 84bd2fc commit 296c559
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions _sources/library-reference/dylan/threads.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ The dynamic environment
-----------------------

Dylan has an implicit notion of a *dynamic environment*, corresponding
to language constructs with *dynamic extent*. For example, the *block*
construct can introduce *cleanup-clauses*, and the *body* of the block
to language constructs with *dynamic extent*. For example, the :drm:`block`
construct can introduce *cleanup-clauses*, and the *body* of the :drm:`block`
is executed in a dynamic environment in which those cleanup-clauses are
active. *Handlers* and *exit procedures* are other examples of language
features related to the dynamic environment.
Expand Down Expand Up @@ -197,7 +197,7 @@ a property of the dynamic environment.
Thread variables can have new dynamic bindings created for them with the
macro :macro:`dynamic-bind`. Thread variables inherently have
thread-local bindings, so it is possible to re-bind a thread variable
dynamically using the Dylan construct ``*block* ... *cleanup*``. The
dynamically using the Dylan construct ``block ... cleanup``. The
:macro:`dynamic-bind` macro can be implemented in this way.

The thread-local nature of dynamically bindable variables may not be
Expand Down Expand Up @@ -769,7 +769,7 @@ Locks
let the-lock = *lock*;
if (wait-for(the-lock, *keys ...*))
block ()
*body*...
...*body*...
cleanup
release(the-lock)
end block
Expand Down Expand Up @@ -1820,13 +1820,13 @@ feature.

.. code-block:: dylan
*name* (*arg* 1, ... *arg* n)
*name* (*arg1*, ... *argn*)
The macro expands into this call:

.. code-block:: dylan
*name* -conditional-updater(*new-value*, *local-name*, *arg* 1, ... *arg* n)
*name* -conditional-updater(*new-value*, *local-name*, *arg1*, ... *argn*)
If the result of this function call is :drm:`#f`, the conditional update is
deemed to have failed.
12 changes: 6 additions & 6 deletions library-reference/dylan/threads.html
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,8 @@ <h3>Conditional update<a class="headerlink" href="#conditional-update" title="Pe
<section id="the-dynamic-environment">
<h3>The dynamic environment<a class="headerlink" href="#the-dynamic-environment" title="Permalink to this heading"></a></h3>
<p>Dylan has an implicit notion of a <em>dynamic environment</em>, corresponding
to language constructs with <em>dynamic extent</em>. For example, the <em>block</em>
construct can introduce <em>cleanup-clauses</em>, and the <em>body</em> of the block
to language constructs with <em>dynamic extent</em>. For example, the <a class="reference external" href="https://opendylan.org/books/drm/Statement_Macros#block"><code class="xref drm docutils literal notranslate"><span class="pre">block</span></code></a>
construct can introduce <em>cleanup-clauses</em>, and the <em>body</em> of the <a class="reference external" href="https://opendylan.org/books/drm/Statement_Macros#block"><code class="xref drm docutils literal notranslate"><span class="pre">block</span></code></a>
is executed in a dynamic environment in which those cleanup-clauses are
active. <em>Handlers</em> and <em>exit procedures</em> are other examples of language
features related to the dynamic environment.</p>
Expand Down Expand Up @@ -700,7 +700,7 @@ <h3>Dynamic binding<a class="headerlink" href="#dynamic-binding" title="Permalin
<p>Thread variables can have new dynamic bindings created for them with the
macro <a class="reference internal" href="#dylan:threads:dynamic-bind"><code class="xref dylan dylan-macro docutils literal notranslate"><span class="pre">dynamic-bind</span></code></a>. Thread variables inherently have
thread-local bindings, so it is possible to re-bind a thread variable
dynamically using the Dylan construct <code class="docutils literal notranslate"><span class="pre">*block*</span> <span class="pre">...</span> <span class="pre">*cleanup*</span></code>. The
dynamically using the Dylan construct <code class="docutils literal notranslate"><span class="pre">block</span> <span class="pre">...</span> <span class="pre">cleanup</span></code>. The
<a class="reference internal" href="#dylan:threads:dynamic-bind"><code class="xref dylan dylan-macro docutils literal notranslate"><span class="pre">dynamic-bind</span></code></a> macro can be implemented in this way.</p>
<p>The thread-local nature of dynamically bindable variables may not be
optimal for all problem domains. For instance a shared, global,
Expand Down Expand Up @@ -1356,7 +1356,7 @@ <h3>Locks<a class="headerlink" href="#locks" title="Permalink to this heading">
<div class="highlight-dylan notranslate"><div class="highlight"><pre><span></span><span class="k">let</span><span class="w"> </span><span class="n">the-lock</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="vg">*lock*</span><span class="p">;</span>
<span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">wait-for</span><span class="p">(</span><span class="n">the-lock</span><span class="p">,</span><span class="w"> </span><span class="n">*keys</span><span class="w"> </span><span class="p">...</span><span class="o">*</span><span class="p">))</span>
<span class="w"> </span><span class="nb">block</span><span class="w"> </span><span class="p">()</span>
<span class="w"> </span><span class="vg">*body*</span><span class="p">...</span>
<span class="w"> </span><span class="p">...</span><span class="vg">*body*</span><span class="p">...</span>
<span class="w"> </span><span class="k">cleanup</span>
<span class="w"> </span><span class="n">release</span><span class="p">(</span><span class="n">the-lock</span><span class="p">)</span>
<span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="nb">block</span>
Expand Down Expand Up @@ -2574,11 +2574,11 @@ <h3>An extended form of conditional-update!<a class="headerlink" href="#an-exten
<em>place</em> that has the syntax of a call to a function. This extended form
for <a class="reference internal" href="#dylan:threads:conditional-update!"><code class="xref dylan dylan-macro docutils literal notranslate"><span class="pre">conditional-update!</span></code></a> is analogous to that for <a class="reference external" href="https://opendylan.org/books/drm/Function_Macros#assignment"><code class="xref drm docutils literal notranslate"><span class="pre">:=</span></code></a>. In this case,
if the <em>place</em> appears syntactically as</p>
<div class="highlight-dylan notranslate"><div class="highlight"><pre><span></span><span class="vg">*name*</span><span class="w"> </span><span class="p">(</span><span class="vg">*arg*</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="vg">*arg*</span><span class="w"> </span><span class="n">n</span><span class="p">)</span>
<div class="highlight-dylan notranslate"><div class="highlight"><pre><span></span><span class="vg">*name*</span><span class="w"> </span><span class="p">(</span><span class="vg">*arg1*</span><span class="p">,</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="vg">*argn*</span><span class="p">)</span>
</pre></div>
</div>
<p>The macro expands into this call:</p>
<div class="highlight-dylan notranslate"><div class="highlight"><pre><span></span><span class="vg">*name*</span><span class="w"> </span><span class="n">-conditional-updater</span><span class="p">(</span><span class="vg">*new-value*</span><span class="p">,</span><span class="w"> </span><span class="vg">*local-name*</span><span class="p">,</span><span class="w"> </span><span class="vg">*arg*</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="vg">*arg*</span><span class="w"> </span><span class="n">n</span><span class="p">)</span>
<div class="highlight-dylan notranslate"><div class="highlight"><pre><span></span><span class="vg">*name*</span><span class="w"> </span><span class="n">-conditional-updater</span><span class="p">(</span><span class="vg">*new-value*</span><span class="p">,</span><span class="w"> </span><span class="vg">*local-name*</span><span class="p">,</span><span class="w"> </span><span class="vg">*arg1*</span><span class="p">,</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="vg">*argn*</span><span class="p">)</span>
</pre></div>
</div>
<p>If the result of this function call is <a class="reference external" href="https://opendylan.org/books/drm/Other_Built-In_Objects_Defined#false"><code class="xref drm docutils literal notranslate"><span class="pre">#f</span></code></a>, the conditional update is
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 296c559

Please sign in to comment.