Fix broken test in core::task

This commit is contained in:
Brian Anderson 2012-09-13 15:06:27 -07:00
parent 43924f1f9f
commit 8a8ca1863d

View File

@ -2425,10 +2425,14 @@ fn test_tls_cleanup_on_failure() unsafe {
#[test]
fn test_sched_thread_per_core() {
let cores = rustrt::rust_num_threads();
let mut reported_threads = 0u;
let (chan, port) = pipes::stream();
do spawn_sched(ThreadPerCore) {
reported_threads = rustrt::sched_threads();
let cores = rustrt::rust_num_threads();
let reported_threads = rustrt::sched_threads();
assert(cores as uint == reported_threads as uint);
chan.send(());
}
assert(cores == reported_threads);
port.recv();
}