Is there any technique or tool available to detect this kind of a deadlock during runtime?
picture this in a worker thread (one of several, normally 4-6)
try
WaitForSingleObject(myMutex);
DoSTuffThatMightCauseAnException;
except
ReleaseMutex(myMutex);
end;
or more generally is there a design-pattern to avoid these kind of bugs?
I coded the above code in the little hous after a longer hacking run