3 ms·
You can't acquire locks in any order, that's a recipe for deadlock when one process has acquired half the locks and another has the different half, resulting in
by pjc50 7y ago
You can't acquire locks in any order, that's a recipe for deadlock when one process has acquired half the locks and another has the different half, resulting in them waiting on each other.
Use of WaitForMultipleObjects is more usually for completion of tasks, in the way that win32 "overlapped" works.
- pizlonator 7y agoYou absolutely can try to acquire locks in any order if you are just trying to find the first one that is available. Remember, the algorithm in my example is one where you hold locks one at a time. You can acquire locks in any order if you hold them one at a time. Also my example is intentionally not about wine or win32. I’m articulating why this interface is independently valuable.
- deleted 7y ago[deleted]