If a class inherting from BufferWithLocks does not correctly release Read/Write locks, or does not correctly check that the AcquireReadLock/AcquireWriteLock has returned true, it is possible to end up with a deadlock situation where a subsequent Read/Write call will wait indefinitely.
As a safety measure, a ReadWriteTimeout property (defaulting to 100ms) will be added to BufferWithLocks, and all Read/Write operations will timeout with a TimedoutException if the WaitEvent is not set within that timeframe.
If using AcquireReadLock/ReleaseReadLock and AcquireWriteLock/ReleaseWriteLock correctly this timeout will never occur.
If a class inherting from BufferWithLocks does not correctly release Read/Write locks, or does not correctly check that the AcquireReadLock/AcquireWriteLock has returned true, it is possible to end up with a deadlock situation where a subsequent Read/Write call will wait indefinitely.
As a safety measure, a ReadWriteTimeout property (defaulting to 100ms) will be added to BufferWithLocks, and all Read/Write operations will timeout with a TimedoutException if the WaitEvent is not set within that timeframe.
If using AcquireReadLock/ReleaseReadLock and AcquireWriteLock/ReleaseWriteLock correctly this timeout will never occur.