Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 427 Bytes

PH_B005.md

File metadata and controls

9 lines (5 loc) · 427 Bytes

PH_B005 - Monitor Signal Without Conditional Loop Effect

Problem

The invocation of Monitor.Pulse(...) or Monitor.PulseAll(...) signals a Monitor.Wait(...) that is enclosed by a while loop. The while loop does not depend on a field that is modified by the signaling thread; thus will not be affected by the signaled change.

Solution

Ensure that the signaling thread applies a change to the object's state.