[DatFile, Traverse] Clean up parallel loops

This commit is contained in:
Matt Nadareski
2017-03-17 23:58:35 -07:00
parent 3f6553832b
commit d7eadf66cc
5 changed files with 27 additions and 50 deletions

View File

@@ -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);
});