--- old/src/hotspot/os/windows/os_windows.cpp 2019-09-08 23:47:47.211841756 -0400 +++ new/src/hotspot/os/windows/os_windows.cpp 2019-09-08 23:47:45.964828950 -0400 @@ -3597,7 +3597,8 @@ void os::interrupt(Thread* thread) { debug_only(Thread::check_for_dangling_thread_pointer(thread);) - + assert(thread->is_Java_thread(), "invariant"); + JavaThread* jt = (JavaThread*) thread; OSThread* osthread = thread->osthread(); osthread->set_interrupted(true); // More than one thread can get here with the same value of osthread, @@ -3607,14 +3608,12 @@ OrderAccess::release(); SetEvent(osthread->interrupt_event()); // For JSR166: unpark after setting status - if (thread->is_Java_thread()) { - ((JavaThread*)thread)->parker()->unpark(); - } + jt->parker()->unpark(); ParkEvent * ev = thread->_ParkEvent; if (ev != NULL) ev->unpark(); - ev = thread->_SleepEvent; + ev = jt->_SleepEvent; if (ev != NULL) ev->unpark(); }