Surelock: Deadlock-Free Mutexes for Rust
notes.brooklynzelenka.com
Surelock: Deadlock-Free Mutexes for Rust
1–10 of 90 posts
Re: Surelock: Deadlock-Free Mutexes for Rust
#2Re: Surelock: Deadlock-Free Mutexes for Rust
#3I agree with the author: it's a shame that TVars aren't catching on in more languages. They are a great idea from the database world, that we could use in the rest of computing, too.
One thing that I think do affect things, is that language design discussions tend to be concentrated into their own communities based on the programming language itself, rather than one "programming language discussions" place where everyone can easier cross-pollinate ideas across languages. Luckily, there are some individuals who move between communities without effort, which does lead to a bit of ideas making it across, but it feels like we're missing out on so much evolution and ideas from various languages across the ecosystem.
Re: Surelock: Deadlock-Free Mutexes for Rust
#4Re: Surelock: Deadlock-Free Mutexes for Rust
#5I agree with the author: it's a shame that TVars aren't catching on in more languages. They are a great idea from the database world, that we could use in the rest of computing, too.
The entire programming (or even computing) ecosystem suffers from this issue where very useful ideas don't always propagate across domains even though they just make a whole lot of sense. I'm not sure if it's because they truly wouldn't work out in practice, or if it's just a discovery/communication thing. One thing that I think do affect things, is that language design discussions tend to be concentrated into their…
Oh, many of these travelers spend a lot of effort!
Re: Surelock: Deadlock-Free Mutexes for Rust
#6But the example seems backwards to me: unless every callsite that locks any item always locks the big global lock first (probably not true, because if you serialize all item access on a global lock then a per-item lock serves no purpose...), aren't you begging for priority inversions by acquiring the big global lock before you acquire the item lock?
My only gripe is missing the obvious opportunity for Ferengi memes ("rules of acquisition") :D :D
Re: Surelock: Deadlock-Free Mutexes for Rust
#7Re: Surelock: Deadlock-Free Mutexes for Rust
#8Re: Surelock: Deadlock-Free Mutexes for Rust
#9I agree with the author: it's a shame that TVars aren't catching on in more languages. They are a great idea from the database world, that we could use in the rest of computing, too.
http://joeduffyblog.com/2010/01/03/a-brief-retrospective-on-...
Re: Surelock: Deadlock-Free Mutexes for Rust
#10The Level abstraction is a really neat way to have your cake and eat it too: you only need a consistent arbitrary order to avoid deadlocks, but the order can have performance consequences when some locks are more coarse than others. But the example seems backwards to me: unless every callsite that locks any item always locks the big global lock first (probably not true, because if you serialize all item access on a g…
There’s no priority inversion possible because locks can only ever be held in decreasing orders of priority - you can’t acquire a low priority lock and then a high priority lock since your remaining MutexKey won’t have the right level.