mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
Merge 56f93c5491 into be41922c54
This commit is contained in:
commit
ddb5988052
1 changed files with 20 additions and 10 deletions
|
|
@ -155,7 +155,7 @@ namespace PepperDash.Essentials.Core.Queues
|
||||||
if (programEvent != eProgramStatusEventType.Stopping)
|
if (programEvent != eProgramStatusEventType.Stopping)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dispose();
|
Dispose(true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,8 +231,13 @@ namespace PepperDash.Essentials.Core.Queues
|
||||||
|
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
Enqueue(null);
|
Debug.Console(2, this, "Disposing...");
|
||||||
_worker.Join();
|
if (_queue != null && !_queue.Disposed)
|
||||||
|
{
|
||||||
|
_queue.Clear();
|
||||||
|
Enqueue(null);
|
||||||
|
}
|
||||||
|
_worker.Abort();
|
||||||
_waitHandle.Close();
|
_waitHandle.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -241,7 +246,7 @@ namespace PepperDash.Essentials.Core.Queues
|
||||||
|
|
||||||
~GenericQueue()
|
~GenericQueue()
|
||||||
{
|
{
|
||||||
Dispose(false);
|
Dispose(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -407,7 +412,7 @@ namespace PepperDash_Essentials_Core.Queues
|
||||||
if (programEvent != eProgramStatusEventType.Stopping)
|
if (programEvent != eProgramStatusEventType.Stopping)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dispose();
|
Dispose(true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -477,8 +482,13 @@ namespace PepperDash_Essentials_Core.Queues
|
||||||
|
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
Enqueue(null);
|
Debug.Console(2, this, "Disposing...");
|
||||||
_worker.Join();
|
if (_queue != null && !_queue.Disposed)
|
||||||
|
{
|
||||||
|
_queue.Clear();
|
||||||
|
Enqueue(null);
|
||||||
|
}
|
||||||
|
_worker.Abort();
|
||||||
_waitHandle.Close();
|
_waitHandle.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -487,7 +497,7 @@ namespace PepperDash_Essentials_Core.Queues
|
||||||
|
|
||||||
~GenericQueue()
|
~GenericQueue()
|
||||||
{
|
{
|
||||||
Dispose(false);
|
Dispose(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue