restore parallel_cycle_one_recover

This commit is contained in:
Niko Matsakis 2024-07-24 09:54:30 +00:00
parent ac474a9c8d
commit 470c5b3d78
2 changed files with 7 additions and 6 deletions

View file

@ -3,6 +3,5 @@ mod setup;
mod parallel_cycle_all_recover; mod parallel_cycle_all_recover;
mod parallel_cycle_mid_recover; mod parallel_cycle_mid_recover;
mod parallel_cycle_none_recover; mod parallel_cycle_none_recover;
#[cfg(disabled)]
mod parallel_cycle_one_recover; mod parallel_cycle_one_recover;
mod signal; mod signal;

View file

@ -2,6 +2,8 @@
//! See `../cycles.rs` for a complete listing of cycle tests, //! See `../cycles.rs` for a complete listing of cycle tests,
//! both intra and cross thread. //! both intra and cross thread.
use salsa::Handle;
use crate::setup::Database; use crate::setup::Database;
use crate::setup::Knobs; use crate::setup::Knobs;
@ -75,18 +77,18 @@ pub(crate) fn b2(db: &dyn Db, input: MyInput) -> i32 {
#[test] #[test]
fn execute() { fn execute() {
let db = Database::default(); let db = Handle::new(Database::default());
db.knobs().signal_on_will_block.set(3); db.knobs().signal_on_will_block.store(3);
let input = MyInput::new(&db, 1); let input = MyInput::new(&*db, 1);
let thread_a = std::thread::spawn({ let thread_a = std::thread::spawn({
let db = db.snapshot(); let db = db.clone();
move || a1(&*db, input) move || a1(&*db, input)
}); });
let thread_b = std::thread::spawn({ let thread_b = std::thread::spawn({
let db = db.snapshot(); let db = db.clone();
move || b1(&*db, input) move || b1(&*db, input)
}); });