The older version of dashmap crate was working fine without deadlock.
Cargo.toml
[package]
edition = "2021"
name = "deadlock"
version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dashmap = "5.5.3"
main.rs
fn main() {
let map = dashmap::DashMap::new();
map.insert("hello", "world");
map.shrink_to_fit();
println!("done shrinking");
}
Terminal output:
jesus@MacBook:~/Developer/deadlock|main⚡ ⇒ cargo run
Compiling deadlock v0.1.0 (/Users/jesus/Developer/deadlock)
Finished dev [unoptimized + debuginfo] target(s) in 0.19s
Running `target/debug/deadlock`
done shrinking
When I update to the lates 6.0.0 version, the Dashmap::shrink_to_fit() method deadlocks.
Cargo.toml
[package]
edition = "2021"
name = "deadlock"
version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dashmap = "6.0.0"
main.rs left unchanged.
Terminal output:
jesus@MacBook:~/Developer/deadlock|main⚡ ⇒ cargo run
Compiling deadlock v0.1.0 (/Users/jesus/Developer/deadlock)
Finished dev [unoptimized + debuginfo] target(s) in 0.34s
Running `target/debug/deadlock`
Is there a regression or am I misusing the method?
Thanks,
Jesus Guzman, Jr.
The older version of
dashmapcrate was working fine without deadlock.Cargo.tomlmain.rsTerminal output:
When I update to the lates
6.0.0version, theDashmap::shrink_to_fit()method deadlocks.Cargo.tomlmain.rsleft unchanged.Terminal output:
Is there a regression or am I misusing the method?
Thanks,
Jesus Guzman, Jr.