Use TypeState to prevent Deadlocks?

โš“ Rust    ๐Ÿ“… 2025-10-17    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 2      

surdeus

2-3 years ago there was a conference talk, which I recall as wrapping Locks in a type ladder. So the compiler ensures that everyone can only obtain them in the same order. Happy enough that this was now common know-how, I did not bookmark it. And now I canโ€™t find it anymore. Do you have the link?

In fact I find very few crates related to deadlocks, and little else. There is a 6 years old Compile time lock ordering approach to deadlocks with an interesting but rather verbose solution. That got almost no reaction.

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed