2
0

"Thread-safe" message adding..

This commit is contained in:
glax 2023-06-20 23:15:22 +02:00
parent 9af5c1603e
commit d5b7645cd2

View File

@ -14,7 +14,8 @@ public class MemoryLogger : LoggerBase
protected override void Write(LogMessage value) protected override void Write(LogMessage value)
{ {
_logMessages.Add(value.logTime, value); while(!_logMessages.TryAdd(value.logTime, value))
Thread.Sleep(10);
} }
public string[] GetLogMessage() public string[] GetLogMessage()