4 ms·
What does sync.Mutex is now more fair really mean?
by deckarep 9y ago
What does sync.Mutex is now more fair really mean?
- zik 9y agoIt probably means that it used to favour activating one waiter over others, but now is less likely to do so.
- mac01021 9y agoImagine Alice acquires the lock. Before she releases it, both Bob and Cathy ask for it. So it goes to Cathy when it's released. Before Cathy releases it, David requests it. If the lock goes to David (and then possibly Emma, Fred, and Gary, and so on forever) before Bob finally gets to continue executing, then the lock is not fair.