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

Article translations Article translations
Article ID: 2795543 - View products that this article applies to.
Expand all | Collapse all

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.

Properties

Article ID: 2795543 - Last Review: January 30, 2013 - Revision: 2.0
Applies to
  • Windows 7 Enterprise
  • Windows 7 Professional
  • Windows 7 Ultimate
  • Windows 7 Service Pack 1
  • Windows Server 2008 R2 Standard
  • Windows Server 2008 R2 Standard without Hyper-V
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Enterprise without Hyper-V
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Datacenter without Hyper-V
  • Windows Server 2008 R2 for Itanium-Based Systems
  • Windows Server 2008 R2 Service Pack 1
Keywords: 
KB2795543

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com