Hacker News new | ask | show | jobs
by chrisseaton 1685 days ago
The OS schedules threads that it wants to run. When you consider which thread to schedule, don't schedule a thread that is waiting for a lock that isn't free yet.
1 comments

Don’t you have to constantly check the status of the lock?
No, because if someone wants to release an OS lock they have to tell you.