Open
Description
WakerSet
contains a spin lock which never falls back to OS-provided blocking facilities:
async-std/src/sync/waker_set.rs
Lines 181 to 182 in 6d69a3e
I think this might lead to a pretty bad behavior in pathological cases, due to priority inversion.
Not sure what's the best solution here is though: std::sync::Mutex
is not the fastest one in town, parking_lot
is an external dependency.
See also https://matklad.github.io/2020/01/02/spinlocks-considered-harmful.html and https://probablydance.com/2019/12/30/measuring-mutexes-spinlocks-and-how-bad-the-linux-scheduler-really-is/.