Spostamento aree protected da Generic a BaseObj

This commit is contained in:
Samuele Locatelli
2026-05-23 21:11:39 +02:00
parent cbee42e466
commit ee31322dda
2 changed files with 5 additions and 28 deletions
+1 -3
View File
@@ -1,6 +1,4 @@
using IOB_UT_NEXT;
using IOB_UT_NEXT.Objects;
using IOB_UT_NEXT.Services.Data;
using IOB_UT_NEXT.Objects;
using NLog;
using System;
+4 -25
View File
@@ -66,7 +66,7 @@ namespace IOB_WIN_FORM.Iob
{
// jitter di avvio per disallineare le istanze nella VM
Random startRnd = new Random();
int startDelay = startRnd.Next(0, 5000);
int startDelay = startRnd.Next(0, 200);
Thread.Sleep(startDelay);
// gestione invio ritardato contapezzi
@@ -149,30 +149,9 @@ namespace IOB_WIN_FORM.Iob
// simulazione processo FTP (Cimolai) - FIXME TODO DeleteME
ProcessDataSync();
}
// carica conf
try
{
// Invece di bloccare il costruttore con .GetAwaiter().GetResult(),
// avviamo il carico in modo "fire-and-forget" controllato.
// Questo evita il context switch pesante durante l'inizializzazione.
_ = Task.Run(async () =>
{
try
{
await Simula_Load(adesso);
}
catch (Exception ex)
{
lgError($"Errore in Simula_Load (background): {ex.Message}");
}
});
}
catch (Exception ex)
{
lgError($"Errore nel lancio del task Simula_Load: {ex.Message}");
}
}
#endregion Public Constructors
#region Public Methods
@@ -516,8 +495,8 @@ namespace IOB_WIN_FORM.Iob
public override async Task InitializeAsync()
{
await Simula_Load(DateTime.Now);
// attendo altri 50ms
await Task.Delay(50);
// attendo altri 10ms
await Task.Delay(10);
}
/// <summary>