You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RemoveExpired() in the Timer may race with SqliteCache.Dispose(), leading to a situation where some commands or connections are added to the DbCommandPool after it has already been disposed, preventing them from being properly disposed of.
Additionally, if an object retrieved from the DbCommandPool is in the process of being disposed, an ObjectDisposedException may be thrown in the Timer callback.
Calling _cleanupTimer?.Dispose() before disposing the DbCommandPool does not guarantee that the timer callback has not already started executing.
(Translated with GPT)
The text was updated successfully, but these errors were encountered:
We'll have to use the Timer.Dispose(WaitHandle) overload to wait for all callbacks to be executed before the call returns (or else add more synchronization that we still need to safely dispose of, possibly via reference counting). This'll make the call to SqlCache.Dispose() block, so it would be good to also make it AsyncDisposable.
RemoveExpired()
in theTimer
may race withSqliteCache.Dispose()
, leading to a situation where some commands or connections are added to theDbCommandPool
after it has already been disposed, preventing them from being properly disposed of.Additionally, if an object retrieved from the
DbCommandPool
is in the process of being disposed, anObjectDisposedException
may be thrown in theTimer
callback.Calling
_cleanupTimer?.Dispose()
before disposing theDbCommandPool
does not guarantee that the timer callback has not already started executing.(Translated with GPT)
The text was updated successfully, but these errors were encountered: