File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ RE-DRAFT: Synopsis 17: Concurrency
13
13
14
14
Created: 3 Nov 2013
15
15
16
- Last Modified: 16 Nov 2013
17
- Version: 7
16
+ Last Modified: 18 Nov 2013
17
+ Version: 8
18
18
19
19
This synopsis is based around the concurrency primitives and tools currently
20
20
being implemented in Rakudo on the JVM. It covers both things that are
@@ -382,13 +382,13 @@ be thrown. There is also a C<winner> statement [keywords still negotiable]:
382
382
383
383
That will invoke the closure associated with the first promise that produces a
384
384
result, either kept or broken. In order to avoid blocking, it is possible to
385
- provide a closure with the C<later > keyword, that will be invoked if none of
385
+ provide a closure with the C<nobody > keyword, that will be invoked if none of
386
386
the promises currently have a result available.
387
387
388
388
winner $p1, $p2 {
389
389
done $p1 { say "First promise got a value" }
390
390
done $p2 { say "Second promise got a value" }
391
- later { say "Not done yet" }
391
+ nobody { say "Not done yet" }
392
392
}
393
393
394
394
The construct as a whole returns the result of whichever block was selected.
You can’t perform that action at this time.
0 commit comments