mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Fix broken test in core::task
This commit is contained in:
parent
43924f1f9f
commit
8a8ca1863d
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user