From c968befafb96f8fc43c3dbdab2d1eed1e088d006 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 9 Jun 2023 12:21:58 +0200 Subject: [PATCH] - aggiunta log --- .../MachManagingThread/MachManaging.vb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/EgtBEAMWALL.Supervisor/MachManagingThread/MachManaging.vb b/EgtBEAMWALL.Supervisor/MachManagingThread/MachManaging.vb index 2968fde5..5310dee3 100644 --- a/EgtBEAMWALL.Supervisor/MachManagingThread/MachManaging.vb +++ b/EgtBEAMWALL.Supervisor/MachManagingThread/MachManaging.vb @@ -58,13 +58,18 @@ Public Class MachManaging End Property Friend Shared Sub AddToCommandList(value As ThreadCommand) SyncLock Lock_CommandList + EgtOutLog("Inizio ciclo rimozioni") For CommandIndex = m_CommandList.Count - 1 To 0 Step -1 Dim Command As ThreadCommand = m_CommandList(CommandIndex) If Command.ProcessingStatus = ThreadCommand.ProcessingStatuses.DONE Then + EgtOutLog("Inizio rimozione comando") m_CommandList.Remove(Command) + EgtOutLog("Fine rimozione comando") End If Next + EgtOutLog("Fine ciclo rimozioni") CommandList.Add(value) + EgtOutLog("Count dopo aggiunta: " & CommandList.Count) End SyncLock End Sub @@ -785,7 +790,9 @@ Public Class MachManaging Private Sub CommandList_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs) If Not IsNothing(e.NewItems) Then - For CommandIndex = 0 To e.NewItems.Count - 1 + EgtOutLog("Inizio ciclo esecuzione comandi") + Dim nCommandCount As Integer = e.NewItems.Count + For CommandIndex = 0 To nCommandCount - 1 Dim Command As ThreadCommand = e.NewItems(CommandIndex) If Command.ProcessingStatus = ThreadCommand.ProcessingStatuses.WAITING Then Command.SetProcessingStatus(ThreadCommand.ProcessingStatuses.PROCESSING) @@ -793,6 +800,7 @@ Public Class MachManaging Command.SetProcessingStatus(ThreadCommand.ProcessingStatuses.DONE) End If Next + EgtOutLog("Fine ciclo esecuzione di " & nCommandCount & " comandi") End If End Sub