
12 Sep
2005
12 Sep
'05
12:46 p.m.
Roland Schwarz <roland.schwarz@chello.at> writes:
Altough I think I was careful enough, it might well be that I made an mistake. Also since the idea is so simple and it needs so less code for implementation, I am wondering whether someone else came up with this solution. I would be very glad if someone could take a look at the code and show me its pitfalls.
With your changes to use InterlockedDecrement, it looks good. Off hand, I can't think of a reason why it would break --- I don't believe it suffers from deadlocks, lost wakeups, spurious wakeups, or unfairness. You just need to extend it to work with other mutex types, now. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk