File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,12 @@ var x: sync int, a: int;
153
153
writeln("this is main task launching a new task");
154
154
begin {
155
155
for i in 1..10 do writeln("this is new task working: ",i);
156
- x = 2 ;
156
+ x.writeEF(2) ;
157
157
writeln("New task finished");
158
158
}
159
159
160
160
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
162
162
writeln("and now it is done");
163
163
```
164
164
@@ -194,6 +194,15 @@ statement?
194
194
195
195
Discuss your observations.
196
196
197
+
198
+
199
+ abc
200
+
201
+
202
+
203
+
204
+
205
+
197
206
:::::::::::::::::::::::::::::::::::::::::::::::::::
198
207
199
208
There are a number of methods defined for _ sync_ variables. Suppose _ x_ is a sync variable of a given type,
You can’t perform that action at this time.
0 commit comments