private static void WaitWhileOccupied(ReadIndicator readIndicator) { while (!readIndicator.IsEmpty) { ; } }
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(); }
public LeftRightLock() { _readIndicator = new ReadIndicator[2]; _readIndicator[0] = new ReadIndicator(); _readIndicator[1] = new ReadIndicator(); }
public void PrepareForIteration() { _numReading = 0; _readIndicator = new ReadIndicator(); }
public LeftRightLock() { _readIndicator = new ReadIndicator(); }