We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1f31c2 commit 383c032Copy full SHA for 383c032
doc/Language/concurrency.pod
@@ -279,9 +279,9 @@ is an integer starting at 0 that is incremented for each event. The
279
following code outputs 0 .. 5 :
280
281
282
- my $supply = Supply.interval(2);
283
- $supply.tap(-> $v { say $v });
284
- sleep 10;
+ my $supply = Supply.interval(2);
+ $supply.tap(-> $v { say $v });
+ sleep 10;
285
286
This could also be written using the C<react> keyword:
287
@@ -421,9 +421,8 @@ when the channel is closed.
421
Channels can be used in place of the L<Supply> in the C<whenever> of a
422
C<react> block described earlier:
423
424
- my $channel = Channel.new;
425
-
426
- my $p = start {
+ my $channel = Channel.new;
+ my $p = start {
427
react {
428
whenever $channel {
429
say $_;
0 commit comments