diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index 3663eb093..e634de824 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -208,14 +208,17 @@ namespace Tango.MachineStudio.Common.EventLogging } else { - if (_pendingEvents.Count > 0) + lock (_pendingEvents) { - var pending = _pendingEvents.ToList(); - _pendingEvents.Clear(); - - foreach (var ev in pending) + if (_pendingEvents.Count > 0) { - Log(ev); + var pending = _pendingEvents.ToList(); + _pendingEvents.Clear(); + + foreach (var ev in pending) + { + Log(ev); + } } } |
