mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
CiscoSparkCodec > Removed inner IF of processQueuedCommands and added CrestronInvoke to CheckSyncStatus
This commit is contained in:
@@ -118,7 +118,7 @@ namespace PepperDash.Essentials.Core.Queues
|
|||||||
/// <param name="capacity"></param>
|
/// <param name="capacity"></param>
|
||||||
public GenericQueue(string key, int pacing, Thread.eThreadPriority priority, int capacity)
|
public GenericQueue(string key, int pacing, Thread.eThreadPriority priority, int capacity)
|
||||||
: this(key, priority, capacity, pacing)
|
: this(key, priority, capacity, pacing)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2529,12 +2529,9 @@ ConnectorID: {2}"
|
|||||||
{
|
{
|
||||||
while (InitialSyncComplete)
|
while (InitialSyncComplete)
|
||||||
{
|
{
|
||||||
if (!_commandQueue.IsEmpty)
|
var query = _commandQueue.Dequeue();
|
||||||
{
|
|
||||||
var query = _commandQueue.Dequeue();
|
|
||||||
|
|
||||||
_parent.SendText(query);
|
_parent.SendText(query);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2596,7 +2593,11 @@ ConnectorID: {2}"
|
|||||||
InitialSyncComplete = true;
|
InitialSyncComplete = true;
|
||||||
Debug.Console(1, this, "Initial Codec Sync Complete!");
|
Debug.Console(1, this, "Initial Codec Sync Complete!");
|
||||||
Debug.Console(1, this, "{0} Command queued. Processing now...", _commandQueue.Count);
|
Debug.Console(1, this, "{0} Command queued. Processing now...", _commandQueue.Count);
|
||||||
ProcessQueuedCommands();
|
|
||||||
|
// Invoke a thread for the queue
|
||||||
|
CrestronInvoke.BeginInvoke((o) => {
|
||||||
|
ProcessQueuedCommands();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
InitialSyncComplete = false;
|
InitialSyncComplete = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user