mirror of
https://gitee.com/iioter/iotgateway.git
synced 2024-11-29 18:28:09 +08:00
并行加载驱动
This commit is contained in:
parent
da79a78da7
commit
e9ee682f37
@ -114,7 +114,7 @@ namespace Plugin
|
||||
public void LoadAllDrivers()
|
||||
{
|
||||
_logger.LogInformation("LoadAllDrivers Start");
|
||||
foreach (var file in _driverFiles)
|
||||
Parallel.ForEach(_driverFiles, file =>
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -132,9 +132,9 @@ namespace Plugin
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex,$"LoadAllDrivers Error {file}");
|
||||
_logger.LogError(ex, $"LoadAllDrivers Error {file}");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
_logger.LogInformation($"LoadAllDrivers End,Count{DriverInfos.Count}");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user