private void FailOperation(Exception e) { lock (this) { failedFlag = true; isRunning = false; Monitor.Pulse(this); FireAsync(Failed, this, new ThreadExceptionEventArgs(e)); } }