public static bool Interrupted ()
{
if (Thread._wrapperThread == null) {
return false;
}
Thread wrapperThread = Thread._wrapperThread;
lock (wrapperThread) {
bool interrupted = Thread._wrapperThread._interrupted;
Thread._wrapperThread._interrupted = false;
return interrupted;
}
}