mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
Removes call to dispose on program stop event. Adds debug statement in Dispose()
This commit is contained in:
parent
0f28d46f34
commit
33a1b1697a
1 changed files with 16 additions and 12 deletions
|
|
@ -150,13 +150,13 @@ namespace PepperDash.Essentials.Core.Queues
|
|||
_delayEnabled = pacing > 0;
|
||||
_delayTime = pacing;
|
||||
|
||||
CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
|
||||
{
|
||||
if (programEvent != eProgramStatusEventType.Stopping)
|
||||
return;
|
||||
//CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
|
||||
//{
|
||||
// if (programEvent != eProgramStatusEventType.Stopping)
|
||||
// return;
|
||||
|
||||
Dispose(true);
|
||||
};
|
||||
// Dispose(true);
|
||||
//};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -231,6 +231,8 @@ namespace PepperDash.Essentials.Core.Queues
|
|||
|
||||
if (disposing)
|
||||
{
|
||||
Debug.Console(2, this, "Disposing...");
|
||||
_queue.Clear();
|
||||
Enqueue(null);
|
||||
_worker.Join();
|
||||
_waitHandle.Close();
|
||||
|
|
@ -402,13 +404,13 @@ namespace PepperDash_Essentials_Core.Queues
|
|||
_delayEnabled = pacing > 0;
|
||||
_delayTime = pacing;
|
||||
|
||||
CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
|
||||
{
|
||||
if (programEvent != eProgramStatusEventType.Stopping)
|
||||
return;
|
||||
//CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
|
||||
//{
|
||||
// if (programEvent != eProgramStatusEventType.Stopping)
|
||||
// return;
|
||||
|
||||
Dispose(true);
|
||||
};
|
||||
// Dispose(true);
|
||||
//};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -477,6 +479,8 @@ namespace PepperDash_Essentials_Core.Queues
|
|||
|
||||
if (disposing)
|
||||
{
|
||||
Debug.Console(2, this, "Disposing...");
|
||||
_queue.Clear();
|
||||
Enqueue(null);
|
||||
_worker.Join();
|
||||
_waitHandle.Close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue