Skip to content

Commit cbd7f25

Browse files
author
Alex Razoumov
committed
update the code for Chapel 2.x
1 parent 0dd9f33 commit cbd7f25

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

episodes/13-synchronization.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ var x: sync int, a: int;
153153
writeln("this is main task launching a new task");
154154
begin {
155155
for i in 1..10 do writeln("this is new task working: ",i);
156-
x = 2;
156+
x.writeEF(2);
157157
writeln("New task finished");
158158
}
159159
160160
writeln("this is main task after launching new task... I will wait until it is done");
161-
a = x; // don't run this line until the variable x is written in the other task
161+
a = x.readFF(); // don't run this line until the variable x is written in the other task
162162
writeln("and now it is done");
163163
```
164164

@@ -194,6 +194,15 @@ statement?
194194

195195
Discuss your observations.
196196

197+
198+
199+
abc
200+
201+
202+
203+
204+
205+
197206
:::::::::::::::::::::::::::::::::::::::::::::::::::
198207

199208
There are a number of methods defined for _sync_ variables. Suppose _x_ is a sync variable of a given type,

0 commit comments

Comments
 (0)