mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-14 04:58:33 +00:00
test: Fixing unit tests
This commit is contained in:
parent
644388edad
commit
72fd823643
2 changed files with 14 additions and 4 deletions
|
|
@ -56,8 +56,17 @@ namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
OnItemDequeued = null;
|
OnItemDequeued = null;
|
||||||
|
|
||||||
|
m_QueueSection.Enter();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
m_DequeueTimer.Dispose();
|
m_DequeueTimer.Dispose();
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
m_QueueSection.Leave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enqueues the given item.
|
/// Enqueues the given item.
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,12 @@ namespace ICD.Common.Utils.Timers
|
||||||
if (IsDisposed)
|
if (IsDisposed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
IsDisposed = true;
|
||||||
|
|
||||||
Stop();
|
Stop();
|
||||||
m_Timer.Dispose();
|
m_Timer.Dispose();
|
||||||
|
|
||||||
m_Callback = null;
|
m_Callback = null;
|
||||||
|
|
||||||
IsDisposed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
// 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
|
// the reference to the timer will be cleared, and eventually the CTimer will call the callback
|
||||||
// despite being stopped/disposed.
|
// despite being stopped/disposed.
|
||||||
if (m_Timer == null
|
if (IsDisposed ||
|
||||||
|
m_Timer == null
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
|| m_Timer.Disposed
|
|| m_Timer.Disposed
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue