Skip to content

Commit 008592c

Browse files
committed
Disable broken multi_thread_multiple_run test.
std::sync::TaskPool is removed rust-lang/rust#22783 .
1 parent c7db68f commit 008592c

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

tests/unorganized.rs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,23 @@ fn single_thread_multiple_run() {
2828
}
2929
}
3030

31-
#[test]
32-
fn multi_thread_multiple_run() {
33-
// TODO Insert purposeful sleep for each task?
34-
let task_pool = std::sync::TaskPool::new(10);
35-
let semaphore = std::sync::Arc::new(std::sync::Semaphore::new(-999));
36-
for _ in 0..1000 {
37-
let semaphore_task = semaphore.clone();
38-
task_pool.execute(move || {
39-
single_thread_multiple_run();
40-
semaphore_task.release();
41-
});
42-
}
43-
semaphore.access();
44-
}
31+
// TODO std::sync::TaskPool is removed. https://github.com/rust-lang/rust/pull/22783
32+
// Find a way to re-enable this test.
33+
34+
// #[test]
35+
// fn multi_thread_multiple_run() {
36+
// // TODO Insert purposeful sleep for each task?
37+
// let task_pool = std::sync::TaskPool::new(10);
38+
// let semaphore = std::sync::Arc::new(std::sync::Semaphore::new(-999));
39+
// for _ in 0..1000 {
40+
// let semaphore_task = semaphore.clone();
41+
// task_pool.execute(move || {
42+
// single_thread_multiple_run();
43+
// semaphore_task.release();
44+
// });
45+
// }
46+
// semaphore.access();
47+
// }
4548

4649
#[test]
4750
#[should_panic(expected = "This Context instance is in use now. Note that a Context instance is allowed per construction location and per thread. Consequently, it cannot be recursively constructed unless it is destructed. This is a limitation caused by the thread local static variables usages in the current implementation.")]

0 commit comments

Comments
 (0)