private void StopLogging() { if (_worker == null) return; BracketEvent.Event-=LogEvent; _stopRequested = true; _queueWait.Set(); //Let's give it a chance to finish its dirty business. _worker.Join(TimeSpan.FromMilliseconds(500)); _worker = null; }