Closed abrenneke closed 1 year ago
Do you happen to have a minimal reproduction of any kind?
I think this is reproducing the deadlock! Sometimes it's printing 0
, sometimes 0
and 1000
, but never continues forever like it should. I'm on Windows if it makes a difference.
use lasso::ThreadedRodeo;
use std::sync::{Arc, Barrier};
fn main() {
let thread_count = 10;
let barrier = Arc::new(Barrier::new(thread_count));
let interner = Arc::new(ThreadedRodeo::default());
let mut handles = Vec::with_capacity(thread_count);
for _ in 0..thread_count {
let barrier = barrier.clone();
let interner = interner.clone();
handles.push(std::thread::spawn(move || {
let mut i = 0;
loop {
interner.get_or_intern(format!("Hello, world! {}", i));
if (i % 1000) == 0 {
barrier.wait();
println!("{}", i);
}
i += 1;
}
}));
}
for handle in handles {
handle.join().unwrap();
}
}
30a5413 fixes this locally (both for running the test and under ThreadSanitizer), can you confirm that you're no longer encountering the issue?
sorry for the late reply, but works great now! thanks!
Hi, just used lasso for the first time and I was getting deadlocks and panics inside of
DashMap
- had no idea what I was doing wrong. After like an hour of debugging I noticed that 0.7.0 just came out a week ago so on a hunch I tried 0.6.0 - deadlocks and panics went away!If it helps here's the panic trace: