An application hangs when it calls SignalObjectAndWait in Windows 7 or Windows Server 2008 R2

Symptoms

An application that calls the SignalObjectAndWait and PulseEvent APIs may experience a deadlock in Windows 7 or in Windows Server 2008 R2. If the threads that are signalled by SignalObjectAndWait call PulseEvent to signal the waiting object of the SignalObjectAndWait call, the caller thread of SignalObjectAndWait cannot receive the signal state of the waiting object.

Cause

The Signal and Wait operations are not guaranteed to be performed as atomic operations when an application calls the SignalObjectAndWait function.

Resolution

To resolve this problem, configure the application to call the SetEvent API instead of the PulseEvent API. This method should work in most cases.
Propriétés

ID d'article : 2795543 - Dernière mise à jour : 30 janv. 2013 - Révision : 1

Commentaires