diff --git a/Plugins/Plugin/DeviceService.cs b/Plugins/Plugin/DeviceService.cs index 408b92b..88fbd24 100644 --- a/Plugins/Plugin/DeviceService.cs +++ b/Plugins/Plugin/DeviceService.cs @@ -40,10 +40,7 @@ namespace Plugin .Include(x => x.Parent).Include(x => x.Driver).Include(x => x.DeviceConfigs) .Include(x => x.DeviceVariables).AsNoTracking().ToList(); _logger.LogInformation($"Loaded Devices Count:{devices.Count()}"); - foreach (var device in devices) - { - CreateDeviceThread(device); - } + Parallel.ForEach(devices, CreateDeviceThread); } } catch (Exception ex)