mirror of
https://gitee.com/iioter/iotgateway.git
synced 2024-11-29 18:28:09 +08:00
并行启动采集线程
This commit is contained in:
parent
e9ee682f37
commit
68f217fa3f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user