… | … | ||
---|---|---|---|
19 | $produced->up; | 19 | $produced->up; |
20 | yield if @buffer > 5; # simulate memory pressure ;) | 20 | yield if @buffer > 5; # simulate memory pressure ;) |
21 | } | 21 | } |
22 | print "work done\n"; | 22 | print "work done\n"; |
23 | $finished->up; | 23 | $finished->up; |
24 | $idle; | ||
25 | }; | 24 | }; |
26 | 25 | ||
27 | async { | 26 | async { |
28 | while () { | 27 | while () { |
29 | $produced->down; | 28 | $produced->down; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |