also those dispatcher tricks wont help the test, it still sporadically fails

This commit is contained in:
Marcel Märtens 2022-08-19 09:30:56 +02:00
parent 25d9e5b27e
commit 8ca458188d

View File

@ -155,10 +155,14 @@ impl InternalSlowJobPool {
let dispatch_receiver = Mutex::new(dispatch_receiver); let dispatch_receiver = Mutex::new(dispatch_receiver);
let threadpool2 = Arc::clone(&threadpool); let threadpool2 = Arc::clone(&threadpool);
threadpool.spawn(move || { threadpool.spawn(move || {
let dispatch_receiver = dispatch_receiver.lock().unwrap(); threadpool2.in_place_scope(|s| {
for task in dispatch_receiver.iter() { s.spawn(|s| {
threadpool2.spawn(task) let dispatch_receiver = dispatch_receiver.lock().unwrap();
} for task in dispatch_receiver.iter() {
s.spawn(|_| (task)());
}
});
});
}); });
} }