> On 01 May 2015, at 13:57, mt1957 <mt1...@gmail.com> wrote:
> 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;
> $c.cancel;
> 
> 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.

Thank you for reporting.  Yes, this is a known issue, potentially of the 
underlying libuv system.

BTW, it is generally thought not to be a good idea to directly call the 
scheduler directly like that. You probably want to use the Promise.in or the 
Supply.interval functionality to achieve the same effect.  And the same bug.  
Well, for now then.




Kind regards,

Liz

Reply via email to