> On 29 Dec 2014, at 03:05, Rob Hoelz (via RT) <perl6-bugs-follo...@perl.org> > wrote: > > # New Ticket Created by Rob Hoelz > # Please include the string: [perl #123515] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=123515 > > > > See the attached script. When running the script, CPU usage (as reported by > top) is very high.<supply-cpu-test.p6>
Looking deeper into the code, this appears to be caused by the implementation of “earliest” (former “winner”), which basically does a Thread.yield(): loop { Thread.yield } This also eats 100% of one CPU. Not sure whether this is intended behaviour of Thread.yield or not. Having to use Thread.yield in “earliest” may also be sub-optimal. Liz