How to release multiple mutexes in one call

201 views Asked by At

WinAPI provides us with WaitForMultipleObjects(..) function. Let's say we have to wait for all mutexes in array, then it would be great to have function that releases captured mutexes from array in one call. What made microsoft not to provide us with such a useful thing? What solution is best to release mutexes after WaitForMultipleObjects(..) if they are many enough?

1

There are 1 answers

0
John Zwinck On BEST ANSWER

Raymond Chen of Microsoft may not have written about your exact topic, but he has written about others like it. And as he says, "Every feature starts with -100 points." There is no compelling need for the feature you are asking for; the code to implement it is too short, too unlikely to be used in very many places, and would be no better in a library than in the application.

People already complain that the Win32 API is bloated. Be happy they didn't add this.