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
Weird interaction between sleep() and Promises #3631
Comments
From flussence@gmail.comIRClogs for reference: http://irclog.perlgeek.de/perl6/2014-12-29#i_9865603 I have this golfed-down example, tested on Rakudo 2014.12 JVM+MoarVM: await Promise.anyof( start({ sleep 2*3; say 3 }), I'd expect that to produce output roughly equivalent to writing: for 1..3 { .say; sleep 2 } But what happens instead is more like this: sleep 6; say 3; say 1; sleep 2; say 2; Other stuff I've found: If I change the start() to a |
From @jnthnOn Mon Dec 29 13:30:31 2014, flussence@gmail.com wrote:
The scheduler was making some bad assumptions that Promise.in things wouldn't go doing things like sleeping or hogging resources for a while. While, of course, if you do that there will eventually be problems with thread exhaustion, there's no reason simple examples like this shouldn't work. So, fixed, and added a test in S17-promise/in.t. |
The RT System itself - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123520 (status was 'resolved')
Searchable as RT123520$
The text was updated successfully, but these errors were encountered: