Hacker News new | ask | show | jobs
by temac 2363 days ago
Does it really sleep for a specified period instead of doing directed wake-ups? If so that's very far from ideal...
1 comments

No, a thread that fails to acquire the mutex sleeps until the thread that is releasing the mutex explicitly wakes it. On Linux this is achieved via FUTEX_WAIT / FUTEX_WAKE.