mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, Traverse] Clean up parallel loops
This commit is contained in:
8
SabreTools.Helper/External/Traverse.cs
vendored
8
SabreTools.Helper/External/Traverse.cs
vendored
@@ -38,9 +38,7 @@ namespace SabreTools.Helper.External
|
||||
}
|
||||
subdirs.Clear();
|
||||
|
||||
Parallel.ForEach(dirs,
|
||||
Globals.ParallelOptions,
|
||||
currentDir =>
|
||||
Parallel.ForEach(dirs, Globals.ParallelOptions, currentDir =>
|
||||
{
|
||||
string[] subDirs = Directory.GetDirectories(currentDir);
|
||||
|
||||
@@ -56,9 +54,7 @@ namespace SabreTools.Helper.External
|
||||
try
|
||||
{
|
||||
FileInfo[] files = dir.GetFiles("*.*", SearchOption.TopDirectoryOnly);
|
||||
Parallel.ForEach(files,
|
||||
Globals.ParallelOptions,
|
||||
info =>
|
||||
Parallel.ForEach(files, Globals.ParallelOptions, info =>
|
||||
{
|
||||
action(info);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user