2 ms·
> These are OS primitives I'm talking about - I haven't checked out the standard library version but the parking_lot version uses a spinlock with thread sleep w
by yencabulator 11mo ago
> These are OS primitives I'm talking about - I haven't checked out the standard library version but the parking_lot version uses a spinlock with thread sleep when the wait times get too high - it has no way of getting notified when the mutex gets unblocked nor does it support priority inversion.
Uhh no, everyone in Linux userspace uses futexes these days to wait on a contended lock.
https://github.com/Amanieu/parking_lot/blob/03d36d62fecbd85ce7cea1babfae23c673f0c6a3/core/src/thread_parker/linux.rs#L64-L68 https://github.com/Amanieu/parking_lot/blob/03d36d62fecbd85c...