diff --git a/src/J2N/Threading/ThreadJob.cs b/src/J2N/Threading/ThreadJob.cs index 987a72df..37b467a0 100644 --- a/src/J2N/Threading/ThreadJob.cs +++ b/src/J2N/Threading/ThreadJob.cs @@ -130,10 +130,11 @@ protected virtual void SafeRun(ThreadStart start) private bool IsThreadingException(Exception e) { + // NOTE: We don't swallow ThreadAbortException because we don't want + // to interfere with normal operation of the thread. + // We also had ThreadInterruptedExcption here once, but Lucene.NET requires + // it to be rethrown on the calling thread. return -#if FEATURE_THREADINTERRUPT - e.GetType().Equals(typeof(ThreadInterruptedException)) || -#endif #if FEATURE_THREADABORT e.GetType().Equals(typeof(ThreadAbortException)) || #endif @@ -456,7 +457,6 @@ public static void Sleep(long milliSeconds, int nanoSeconds) /// has a bending interrupt request; othewise, false. public static bool Interrupted() { - try { Thread.Sleep(0);