
11 Dec
2006
11 Dec
'06
9:44 p.m.
Sebastian Redl wrote:
Anthony Williams wrote:
I believe the following is a valid scenario:
Thread A:
WaitForSingleObject(hSemaphore) // blocks
Thread B:
ReleaseSemaphore(hSemaphore,1)
Thread C:
WaitForSingleObject(hSemaphore) // returns immediately
Thread A still blocked
I can't remember where I got this impression, and I may be wrong.
No, you're absolutely right. This is something that, for example, The Old New Thing had an article about.
Yep, here it is: http://blogs.msdn.com/oldnewthing/archive/2006/03/13/550402.aspx