コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharp.Locking.LockCondition"/> class.
 /// </summary>
 /// <param name="signalId">Signal identifier used to notify waiting threads which condition was statisfied.</param>
 /// <param name="monitor">The <c>LockMonitor</c> used in the parent lock.</param>
 public LockCondition(string signalId, LockMonitor monitor)
 {
     _signalId       = signalId;
     _monitor        = monitor;
     _waitingThreads = new HashSet <string>();
     _threadSignals  = new HashStack <string, string>();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharp.Locking.ReentrantLock"/> class.
 /// </summary>
 public ReentrantLock()
 {
     _ids       = new ConditionIds("REL", 1);
     _monitor   = new LockMonitor();
     _lockCount = 0;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharp.Locking.LockCondition"/> class.
 /// </summary>
 /// <param name="signalId">Signal identifier used to notify waiting threads which condition was statisfied.</param>
 /// <param name="monitor">The <c>LockMonitor</c> used in the parent lock.</param>
 public LockCondition(string signalId, LockMonitor monitor) {
     _signalId = signalId;
     _monitor = monitor;
     _waitingThreads = new HashSet<string>();
     _threadSignals = new HashStack<string, string>();
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharp.Locking.ReentrantLock"/> class.
 /// </summary>
 public ReentrantLock() {
     _ids = new ConditionIds("REL", 1);
     _monitor = new LockMonitor();
     _lockCount = 0;
 }