I want to know what happens when a thread or process that holds a
semaphore dies? windows does not see to have a SEM_UNDO kind of
functionality. How to handle this situation?
a.p.
The only synch objects in Win32 that are associated with owners are muteces.
If the owner of a mutex dies without releasing it, threads waiting on the
mutex return from the wait with a special return value (MUTEX_ABANDONED or
something the like).
If you have control over the thread that has claimed the semaphore, you can
use SEH to ensure that the semaphore is always released (you should use SEH
in any case).
RAc
"joe" <ace_...@rediffmail.com> schrieb im Newsbeitrag
news:5ca11246.01100...@posting.google.com...