Example #1
0
 public void BeginWrite(long which)
 {
     RE.MaybeSwitch();
     RE.Assert(!_reading.Contains(which), $"Read in progress during write at {which}");
     RE.Assert(!_writing.Contains(which), $"Write in progress during write at {which}");
     _writing.Add(which);
 }
Example #2
0
 public void EndRead(long which)
 {
     RE.MaybeSwitch();
     _reading.Remove(which);
     RE.Assert(!_writing.Contains(which), $"Write in progress during read at {which}");
 }