mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[All] Change threading to be global
This commit is contained in:
@@ -52,7 +52,7 @@ namespace SabreTools.Library.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, key =>
|
||||
{
|
||||
List<DatItem> roms = this[key];
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace SabreTools.Library.Dats
|
||||
|
||||
// Now go through and sort all of the individual lists
|
||||
keys = sortable.Keys.ToList();
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
Parallel.ForEach(keys, key =>
|
||||
{
|
||||
// Get the possibly unsorted list
|
||||
List<DatItem> sortedlist = sortable[key];
|
||||
@@ -183,7 +183,7 @@ namespace SabreTools.Library.Dats
|
||||
{
|
||||
// Loop over every key in the dictionary
|
||||
List<string> keys = Keys.ToList();
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
Parallel.ForEach(keys, key =>
|
||||
{
|
||||
// For every item in the current key
|
||||
List<DatItem> items = this[key];
|
||||
@@ -235,7 +235,7 @@ namespace SabreTools.Library.Dats
|
||||
// First we want to get a mapping for all games to description
|
||||
ConcurrentDictionary<string, string> mapping = new ConcurrentDictionary<string, string>();
|
||||
List<string> keys = Keys.ToList();
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
Parallel.ForEach(keys, key =>
|
||||
{
|
||||
List<DatItem> items = this[key];
|
||||
foreach (DatItem item in items)
|
||||
@@ -250,7 +250,7 @@ namespace SabreTools.Library.Dats
|
||||
|
||||
// Now we loop through every item and update accordingly
|
||||
keys = Keys.ToList();
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
Parallel.ForEach(keys, key =>
|
||||
{
|
||||
List<DatItem> items = this[key];
|
||||
List<DatItem> newItems = new List<DatItem>();
|
||||
@@ -305,7 +305,7 @@ namespace SabreTools.Library.Dats
|
||||
|
||||
// Now process all of the roms
|
||||
List<string> keys = Keys.ToList();
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
Parallel.ForEach(keys, key =>
|
||||
{
|
||||
List<DatItem> items = this[key];
|
||||
for (int j = 0; j < items.Count; j++)
|
||||
|
||||
Reference in New Issue
Block a user