并行加载驱动
This commit is contained in:
parent
da79a78da7
commit
e9ee682f37
@ -114,7 +114,7 @@ namespace Plugin
|
|||||||
public void LoadAllDrivers()
|
public void LoadAllDrivers()
|
||||||
{
|
{
|
||||||
_logger.LogInformation("LoadAllDrivers Start");
|
_logger.LogInformation("LoadAllDrivers Start");
|
||||||
foreach (var file in _driverFiles)
|
Parallel.ForEach(_driverFiles, file =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -132,9 +132,9 @@ namespace Plugin
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex,$"LoadAllDrivers Error {file}");
|
_logger.LogError(ex, $"LoadAllDrivers Error {file}");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
_logger.LogInformation($"LoadAllDrivers End,Count{DriverInfos.Count}");
|
_logger.LogInformation($"LoadAllDrivers End,Count{DriverInfos.Count}");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user