mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Globals] Make parallel options easier to use
This commit is contained in:
@@ -40,14 +40,14 @@ namespace SabreTools.Helper.Dats
|
||||
// First do the initial sort of all of the roms
|
||||
List<string> keys = Keys.ToList();
|
||||
Parallel.ForEach(keys,
|
||||
new ParallelOptions() { MaxDegreeOfParallelism = Globals.MaxDegreeOfParallelism },
|
||||
Globals.ParallelOptions,
|
||||
key =>
|
||||
{
|
||||
List<DatItem> roms = this[key];
|
||||
|
||||
// Now add each of the roms to their respective games
|
||||
Parallel.ForEach(roms,
|
||||
new ParallelOptions() { MaxDegreeOfParallelism = Globals.MaxDegreeOfParallelism },
|
||||
Globals.ParallelOptions,
|
||||
rom =>
|
||||
{
|
||||
string newkey = "";
|
||||
@@ -125,7 +125,7 @@ namespace SabreTools.Helper.Dats
|
||||
// Now go through and sort all of the individual lists
|
||||
keys = sortable.Keys.ToList();
|
||||
Parallel.ForEach(keys,
|
||||
new ParallelOptions() { MaxDegreeOfParallelism = Globals.MaxDegreeOfParallelism },
|
||||
Globals.ParallelOptions,
|
||||
key =>
|
||||
{
|
||||
// Get the possibly unsorted list
|
||||
|
||||
Reference in New Issue
Block a user