Making Win32EventLog notification thread safe
authorHenric Müller <hemuller@microsoft.com>
Fri, 16 Sep 2016 12:17:17 +0000 (14:17 +0200)
committerHenric Müller <hemuller@microsoft.com>
Fri, 16 Sep 2016 12:17:17 +0000 (14:17 +0200)
commitab274967bcc6c62186a8fa188ccc9402c83612ec
tree0b770e1ece679f1f7973c7efdc00fdfd0861ba2f
parent668ee608ebba8031ea189dc050470e49499bbc63
Making Win32EventLog notification thread safe

The _notifyResetEvent could be closed and nulled and the
NotifyEventThread would still try to read from the event log.
Also multiple calls to EnableNotification would cause issues.
With this fix, we make sure only one notify event thread is
running and that we thread safe the disabling of notifications.
mcs/class/System/System.Diagnostics/Win32EventLog.cs