private void RunProcessing() { try { int delay = config.HostRequestDelayMilliseconds(); selector = CallSelectorFactory.createISelector(config); selector.setIErrorHandler(errorHandler); threadStarted.Set(); while (!stopThread.WaitOne(delay)) { if (false == selector.Run()) break; } lock (lockLog) { serviceEventLog.WriteEntry("Processing finished."); } } catch (ThreadAbortException) {/*ignore*/} }