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:
@@ -45,16 +45,12 @@ namespace SabreTools.Helper.Dats
|
||||
|
||||
// First do the initial sort of all of the roms
|
||||
List<string> keys = Keys.ToList();
|
||||
Parallel.ForEach(keys,
|
||||
Globals.ParallelOptions,
|
||||
key =>
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
{
|
||||
List<DatItem> roms = this[key];
|
||||
|
||||
// Now add each of the roms to their respective games
|
||||
Parallel.ForEach(roms,
|
||||
Globals.ParallelOptions,
|
||||
rom =>
|
||||
Parallel.ForEach(roms, Globals.ParallelOptions, rom =>
|
||||
{
|
||||
string newkey = "";
|
||||
|
||||
@@ -130,9 +126,7 @@ namespace SabreTools.Helper.Dats
|
||||
|
||||
// Now go through and sort all of the individual lists
|
||||
keys = sortable.Keys.ToList();
|
||||
Parallel.ForEach(keys,
|
||||
Globals.ParallelOptions,
|
||||
key =>
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
{
|
||||
// Get the possibly unsorted list
|
||||
List<DatItem> sortedlist = sortable[key];
|
||||
|
||||
Reference in New Issue
Block a user