-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-concurrencyArea: ConcurrencyArea: ConcurrencyA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Description
use std::comm;
use std::rt::io::timer::Timer;
fn main() {
let (port, chan) = comm::stream();
do spawn {
let mut timer = Timer::new().unwrap();
timer.sleep(10);
chan.send(());
}
loop {
if port.peek() {
break;
}
}
port.recv();
}
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.
Metadata
Metadata
Assignees
Labels
A-concurrencyArea: ConcurrencyArea: ConcurrencyA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows