mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 18:05:46 +00:00
misc: Small cleanups
This commit is contained in:
parent
299be822c4
commit
4aae82bad1
3 changed files with 12 additions and 14 deletions
|
@ -77,7 +77,7 @@ namespace ARMeilleure.Translation
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int pBlkIndex = 0; pBlkIndex < block.Predecessors.Count; pBlkIndex++)
|
for (int pBlkIndex = 0; pBlkIndex < block.Predecessors.Count; pBlkIndex++)
|
||||||
{
|
{
|
||||||
BasicBlock current = block.Predecessors[pBlkIndex];
|
BasicBlock current = block.Predecessors[pBlkIndex];
|
||||||
|
|
|
@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime;
|
using System.Runtime;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
@ -848,18 +849,15 @@ namespace ARMeilleure.Translation.PTC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Thread> threads = new();
|
|
||||||
|
|
||||||
for (int i = 0; i < degreeOfParallelism; i++)
|
List<Thread> threads = Enumerable.Range(0, degreeOfParallelism)
|
||||||
{
|
.Select(idx =>
|
||||||
Thread thread = new(TranslateFuncs)
|
new Thread(TranslateFuncs)
|
||||||
{
|
{
|
||||||
IsBackground = true,
|
IsBackground = true,
|
||||||
Name = "Ptc.TranslateThread." + i
|
Name = "Ptc.TranslateThread." + idx
|
||||||
};
|
}
|
||||||
|
).ToList();
|
||||||
threads.Add(thread);
|
|
||||||
}
|
|
||||||
|
|
||||||
Stopwatch sw = Stopwatch.StartNew();
|
Stopwatch sw = Stopwatch.StartNew();
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,10 @@ namespace Ryujinx.Common.Logging.Targets
|
||||||
string ILogTarget.Name { get => _target.Name; }
|
string ILogTarget.Name { get => _target.Name; }
|
||||||
|
|
||||||
public AsyncLogTargetWrapper(ILogTarget target)
|
public AsyncLogTargetWrapper(ILogTarget target)
|
||||||
: this(target, -1, AsyncLogTargetOverflowAction.Block)
|
: this(target, -1)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public AsyncLogTargetWrapper(ILogTarget target, int queueLimit, AsyncLogTargetOverflowAction overflowAction)
|
public AsyncLogTargetWrapper(ILogTarget target, int queueLimit = -1, AsyncLogTargetOverflowAction overflowAction = AsyncLogTargetOverflowAction.Block)
|
||||||
{
|
{
|
||||||
_target = target;
|
_target = target;
|
||||||
_messageQueue = new BlockingCollection<LogEventArgs>(queueLimit);
|
_messageQueue = new BlockingCollection<LogEventArgs>(queueLimit);
|
||||||
|
|
Loading…
Reference in a new issue