Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions src/libstd/rt/sched.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,25 +1212,22 @@ mod test {
}
}

#[test]
// FIXME: #9407: xfail-test
fn dont_starve_1() {
use rt::comm::oneshot;
use unstable::running_on_valgrind;

// FIXME: #9407: should work while serialized on valgrind
if !running_on_valgrind() {
do stress_factor().times {
do run_in_mt_newsched_task {
let (port, chan) = oneshot();

// This task should not be able to starve the sender;
// The sender should get stolen to another thread.
do spawntask {
while !port.peek() { }
}
do stress_factor().times {
do run_in_mt_newsched_task {
let (port, chan) = oneshot();

chan.send(());
// This task should not be able to starve the sender;
// The sender should get stolen to another thread.
do spawntask {
while !port.peek() { }
}

chan.send(());
}
}
}
Expand Down