Skip to content

Update documentation for wait deep statement #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -2035,9 +2035,9 @@ <h3 id="_explicit_data_dependent_execution">11.3. Explicit data-dependent execut
data dependencies. In some cases it is useful to add explicit data
dependencies, for example if you want to print a message to indicate
that variable was assigned. It is possible for the programmer to
express additional execution ordering using two constructs: the <code>wait</code>
statement and the <code>=&gt;</code> chaining operator.</p></div>
<div class="paragraph"><p>In a wait statement, a block of code is executed after
express additional execution ordering using three constructs: the
<code>wait</code> and <code>wait deep</code> statements and the <code>=&gt;</code> chaining operator.</p></div>
<div class="paragraph"><p>In a <code>wait</code> statement, a block of code is executed after
one or more variables are closed.</p></div>
<div class="listingblock">
<div class="content">
Expand All @@ -2050,6 +2050,17 @@ <h3 id="_explicit_data_dependent_execution">11.3. Explicit data-dependent execut
trace("x and y are closed!");
}</code></pre>
</div></div>
<div class="paragraph"><p>In a <code>wait deep</code> statement, a block of code is executed after all
elements of an array have been closed:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>int A[];
A = [f(), g()];

wait deep (A) {
trace("All elements of A are closed!");
}</code></pre>
</div></div>
<div class="paragraph"><p>The chaining operator chains statements together so that a
statement only executes after the previous statement&#8217;s output
value is closed. This is
Expand Down Expand Up @@ -5504,8 +5515,7 @@ <h2 id="_publications">20. Publications</h2>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated
2017-07-26 14:05:03 CDT
Last updated 2017-07-28 09:56:57 BST
</div>
</div>

Expand Down
19 changes: 16 additions & 3 deletions guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -981,10 +981,10 @@ In general, execution ordering in Swift/T is implicit and driven by
data dependencies. In some cases it is useful to add explicit data
dependencies, for example if you want to print a message to indicate
that variable was assigned. It is possible for the programmer to
express additional execution ordering using two constructs: the +wait+
statement and the +\=>+ chaining operator.
express additional execution ordering using three constructs: the
+wait+ and +wait deep+ statements and the +\=>+ chaining operator.

In a wait statement, a block of code is executed after
In a +wait+ statement, a block of code is executed after
one or more variables are closed.
----
x = f();
Expand All @@ -997,6 +997,19 @@ wait(x, y) {
}
----

In a +wait deep+ statement, a block of code is executed after all
elements of an array have been closed:
----
int A[];
A = [f(), g()];

wait deep (A) {
trace("All elements of A are closed!");
}

----


The chaining operator chains statements together so that a
statement only executes after the previous statement's output
value is closed. This is
Expand Down