mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-10 02:05:20 +00:00
test: Fixing unit tests
This commit is contained in:
@@ -56,7 +56,16 @@ namespace ICD.Common.Utils.Collections
|
||||
{
|
||||
OnItemDequeued = null;
|
||||
|
||||
m_DequeueTimer.Dispose();
|
||||
m_QueueSection.Enter();
|
||||
|
||||
try
|
||||
{
|
||||
m_DequeueTimer.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
m_QueueSection.Leave();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -85,12 +85,12 @@ namespace ICD.Common.Utils.Timers
|
||||
if (IsDisposed)
|
||||
return;
|
||||
|
||||
IsDisposed = true;
|
||||
|
||||
Stop();
|
||||
m_Timer.Dispose();
|
||||
|
||||
m_Callback = null;
|
||||
|
||||
IsDisposed = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -160,7 +160,8 @@ namespace ICD.Common.Utils.Timers
|
||||
// Essentially the meat of this class. There's some weirdness with the garbage collector where
|
||||
// the reference to the timer will be cleared, and eventually the CTimer will call the callback
|
||||
// despite being stopped/disposed.
|
||||
if (m_Timer == null
|
||||
if (IsDisposed ||
|
||||
m_Timer == null
|
||||
#if SIMPLSHARP
|
||||
|| m_Timer.Disposed
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user