Remove superfluous lock from ConsoleLog
This commit is contained in:
parent
d964d2184a
commit
b2343a86bf
1 changed files with 3 additions and 10 deletions
|
@ -14,8 +14,6 @@ namespace Ryujinx
|
|||
|
||||
private static Dictionary<LogLevel, ConsoleColor> _logColors;
|
||||
|
||||
private static object _consoleLock;
|
||||
|
||||
static ConsoleLog()
|
||||
{
|
||||
_logColors = new Dictionary<LogLevel, ConsoleColor>()
|
||||
|
@ -28,8 +26,6 @@ namespace Ryujinx
|
|||
|
||||
_messageQueue = new BlockingCollection<LogEventArgs>(10);
|
||||
|
||||
_consoleLock = new object();
|
||||
|
||||
_messageThread = new Thread(() =>
|
||||
{
|
||||
while (!_messageQueue.IsCompleted)
|
||||
|
@ -63,13 +59,10 @@ namespace Ryujinx
|
|||
|
||||
if (_logColors.TryGetValue(e.Level, out ConsoleColor color))
|
||||
{
|
||||
lock (_consoleLock)
|
||||
{
|
||||
Console.ForegroundColor = color;
|
||||
Console.ForegroundColor = color;
|
||||
|
||||
Console.WriteLine(message);
|
||||
Console.ResetColor();
|
||||
}
|
||||
Console.WriteLine(message);
|
||||
Console.ResetColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue