diff options
| author | bors <bors@rust-lang.org> | 2013-09-22 11:10:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-22 11:10:52 -0700 |
| commit | be5db48bee0df745fda235db156f5fa7ae2d30f7 (patch) | |
| tree | c9268a9cd3d422bfc5dc233cae1c14c75ca62c03 /src/libstd/rt | |
| parent | f6e28d1f450f3685b9d61a056387e8a213b36b7c (diff) | |
| parent | 11a8b3d028496878155f1ae6925fd84411b99dd6 (diff) | |
| download | rust-be5db48bee0df745fda235db156f5fa7ae2d30f7.tar.gz rust-be5db48bee0df745fda235db156f5fa7ae2d30f7.zip | |
auto merge of #9408 : thestinger/rust/valgrind, r=alexcrichton
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/sched.rs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs index 9c6c53c2064..87b39f06dcf 100644 --- a/src/libstd/rt/sched.rs +++ b/src/libstd/rt/sched.rs @@ -1215,18 +1215,22 @@ mod test { #[test] fn dont_starve_1() { use rt::comm::oneshot; + use unstable::running_on_valgrind; - do stress_factor().times { - do run_in_mt_newsched_task { - let (port, chan) = oneshot(); + // 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() { } - } + // 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(()); + chan.send(()); + } } } } |
