/// Prevents write operations from deadlocking by throwing a TimeoutException if the WriteWaitEvent is not available within <see cref="ReadWriteTimeout"/> milliseconds
/// </summary>
privatevoidWriteWait()
{
if(!WriteWaitEvent.WaitOne(ReadWriteTimeout))
thrownewTimeoutException("The write operation timed out waiting for the write lock WaitEvent. Check your usage of AcquireWriteLock/ReleaseWriteLock and AcquireReadLock/ReleaseReadLock.");
}
/// <summary>
/// Prevents read operations from deadlocking by throwing a TimeoutException if the ReadWaitEvent is not available within <see cref="ReadWriteTimeout"/> milliseconds
/// </summary>
privatevoidReadWait()
{
if(!ReadWaitEvent.WaitOne(ReadWriteTimeout))
thrownewTimeoutException("The read operation timed out waiting for the read lock WaitEvent. Check your usage of AcquireWriteLock/ReleaseWriteLock and AcquireReadLock/ReleaseReadLock.");