示例#1
0
 private static void WaitWhileOccupied(ReadIndicator readIndicator)
 {
     while (!readIndicator.IsEmpty)
     {
         ;
     }
 }
示例#2
0
 public LeftRightLock()
 {
     // _readIndicator = new HashedReadIndicator[2];
     // _readIndicator[0] = new HashedReadIndicator(3, 1);
     // _readIndicator[1] = new HashedReadIndicator(3, 1);
     _readIndicator    = new ReadIndicator[2];
     _readIndicator[0] = new ReadIndicator();
     _readIndicator[1] = new ReadIndicator();
 }
示例#3
0
 public LeftRightLock()
 {
     _readIndicator    = new ReadIndicator[2];
     _readIndicator[0] = new ReadIndicator();
     _readIndicator[1] = new ReadIndicator();
 }
 public void PrepareForIteration()
 {
     _numReading    = 0;
     _readIndicator = new ReadIndicator();
 }
示例#5
0
 public LeftRightLock()
 {
     _readIndicator = new ReadIndicator();
 }