
11 Dec
2006
11 Dec
'06
9:19 p.m.
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. Sebastian Redl