diff --git a/MPF/UserControls/LogOutput.xaml.cs b/MPF/UserControls/LogOutput.xaml.cs index 8b450d65..10f398e0 100644 --- a/MPF/UserControls/LogOutput.xaml.cs +++ b/MPF/UserControls/LogOutput.xaml.cs @@ -26,7 +26,7 @@ namespace MPF.UserControls /// /// Queue of items that need to be logged /// - private readonly Queue stringsToLog; + private readonly Queue logQueue; /// /// List of Matchers for progress tracking @@ -57,7 +57,7 @@ namespace MPF.UserControls AddAaruMatchers(); AddDiscImageCreatorMatchers(); - stringsToLog = new Queue(); + logQueue = new Queue(); Task.Run(() => ProcessLogLines()); } @@ -295,9 +295,9 @@ namespace MPF.UserControls brush = Brushes.Yellow; // Enqueue the text - lock (stringsToLog) + lock (logQueue) { - stringsToLog.Enqueue(new Run { Text = text, Foreground = brush }); + logQueue.Enqueue(new Run { Text = text, Foreground = brush }); } } @@ -309,11 +309,11 @@ namespace MPF.UserControls while (true) { // Nothing in the queue means we get to idle - if (stringsToLog.Count == 0) + if (logQueue.Count == 0) continue; // Get the next item from the queue - var nextLogLine = stringsToLog.Dequeue(); + var nextLogLine = logQueue.Dequeue(); string nextText = Dispatcher.Invoke(() => nextLogLine.Text); // Null text gets ignored