New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
earliest { ... } uses busy waiting when used with more than one channel, drives CPU usage up to 100% #3630
Comments
From andreas@andreasvoegele.comOn Mon Dec 29 10:32:42 2014, rob@hoelz.ro wrote:
The attached script demonstrates the busy waiting. The script also leaks memory. In the output of top(1) the CPU is always at 100% and DATA grows: PID USER VIRT RES SHR %CPU %MEM TIME+ DATA COMMAND PID USER VIRT RES SHR %CPU %MEM TIME+ DATA COMMAND Tested with Rakudo Star Release 2015.06 on Slackware64-current. |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Tue Jul 07 13:44:33 2015, voegelas wrote:
earliest is gone, in favor of react/whenever, which also works on supplies. I just replaced the earliest loop: loop { With: react { And can confirm it works and that the CPU stays at zero while waiting. Can't really test the CPU usage easily, but that whenever can be used with multiple channels is tested in S17-supply/syntax.t. |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123519 (status was 'resolved')
Searchable as RT123519$
The text was updated successfully, but these errors were encountered: