Reading though synopsis S17 concurrency I tried the following

$*SCHEDULER.cue: in=>10, { say "10s later" }

which will deliver the string after 10 seconds. However the moar will work like hell at a 100% cpu time before and afterwards! Removing the option 'in' didn't show this problem.

Another option will show the same problem in the following code.

my $c = $*SCHEDULER.cue: :every(1), { say "Oh wow, a kangaroo!" };
sleep 10;

Canceling will stop the output of kangaroos but moar will keep on doing its thing at about 100% cpu time. I didn't found an option or method to stop that thread.

I am working with perl6 version 2015.04-5-g59f57a8 built on MoarVM version 2015.04-3-gbb50941


Reply via email to