Closed as not planned
Closed as not planned
Description
Maybe a duplication of #128231?
AFAIK Mutex
and RwLock
try to support priority inheritance (and that is why it uses pthread mutex in macOS). I'm curious why they just use normal futexes (FUTEX_WAIT_BITSET
and FUTEX_WAKE
in sys/pal/unix/futex.rs
) and do not utilize priority-inheritance futexes on platforms that support PI futexes, namely FUTEX_LOCK_PI
in Linux and UMUTEX_PRIO_INHERIT
in FreeBSD. IMO PI futexes have better cooperation with the system scheduler.