-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Peeking at a port that is used after a sleep rarely terminates #9396
Comments
In addition, if I add error! statements after the sleep call, I don't see any output when the program doesn't terminate. Whether that means that the output is buffered or the timer simply doesn't wake up, I don't know. |
This is happening because |
I can kinda sorta verify this on OSX mountain lion. The provided code sample works, as is.. but if I increase the timeout to based on my println!()-based debugging.. it seemed like it was hanging on On Sat, Sep 21, 2013 at 5:16 PM, Josh Matthews notifications@github.comwrote:
|
Adding a deschedule call to both my sample and my original code did make it work consistently for me. |
Closed by #10830, both sends and receives will yield now, and peek no longer exists. |
On second though, I need to investigate this more to be sure. |
Closes rust-lang#5521 Closes rust-lang#8827 Closes rust-lang#9396 Closes rust-lang#10714
This will often never leave the loop. If the timer is removed, it always succeeds instantly. If the peek is removed (so we block on receiving), it always succeeds once the sleep terminates.
The text was updated successfully, but these errors were encountered: