"Thread-safe" message adding..
This commit is contained in:
parent
9af5c1603e
commit
d5b7645cd2
@ -14,7 +14,8 @@ public class MemoryLogger : LoggerBase
|
||||
|
||||
protected override void Write(LogMessage value)
|
||||
{
|
||||
_logMessages.Add(value.logTime, value);
|
||||
while(!_logMessages.TryAdd(value.logTime, value))
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
public string[] GetLogMessage()
|
||||
|
Loading…
Reference in New Issue
Block a user