comparison Implab/Parallels/Signal.cs @ 129:471f596b2603 v2

Added SharedLock to synchronization routines
author cin
date Thu, 29 Jan 2015 18:31:06 +0300
parents 6241bff0cd64
children
comparison
equal deleted inserted replaced
128:6241bff0cd64 129:471f596b2603
1 using System; 1 using System;
2 using System.Threading; 2 using System.Threading;
3 3
4 namespace Implab.Parallels { 4 namespace Implab.Parallels {
5 /// <summary> 5 /// <summary>
6 /// Implements simple signalling logic using <see cref="Monitor.PulseAll(object)"/>. 6 /// Implements a simple signalling logic using <see cref="Monitor.PulseAll(object)"/>.
7 /// </summary> 7 /// </summary>
8 public class Signal { 8 public class Signal {
9 readonly object m_lock = new object(); 9 readonly object m_lock = new object();
10 bool m_state; 10 bool m_state;
11 11