4 ms·
Does it really sleep for a specified period instead of doing directed wake-ups? If so that's very far from ideal...
by temac 7y ago
Does it really sleep for a specified period instead of doing directed wake-ups? If so that's very far from ideal...
- bdash 7y agoNo, 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.