public static bool currIsCanceled() { if (Thread.currentThread() is CancelableThread) return ((CancelableThread)Thread.currentThread()).isCanceled; return false; }