System.ObjectDisposedException: Cannot access a disposed object.
at System.Threading.TimerQueueTimer.Change(UInt32 dueTime, UInt32 period)
at System.Threading.Timer.Change(Int64 dueTime, Int64 period)
at Open.ChannelExtensions.BatchingChannelReader`1.TryPipeItems(Boolean flush)
at Open.ChannelExtensions.BufferingChannelReader`2.TryRead(TOut& item)
I think this can occur because it's possible TryPipeItems retrieves the _timer value on thread A, the last item is pushed to the channel on thread B which disposes and nulls _timer, but then TryPipeItems on thread A still tries to use the value it previously loaded which has now been disposed.
Today I encountered the following exception:
I think this can occur because it's possible
TryPipeItems
retrieves the _timer value on thread A, the last item is pushed to the channel on thread B which disposes and nulls _timer, but then TryPipeItems on thread A still tries to use the value it previously loaded which has now been disposed.