mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8213236: A partial removed/deleted JavaThread cannot transition
Reviewed-by: dholmes, dcubed, eosterlund
This commit is contained in:
parent
25f14cd757
commit
6e5e462e2a
2 changed files with 4 additions and 2 deletions
|
@ -319,7 +319,9 @@ void VMThread::run() {
|
|||
// Notify the VMThread that the last non-daemon JavaThread has terminated,
|
||||
// and wait until operation is performed.
|
||||
void VMThread::wait_for_vm_thread_exit() {
|
||||
{ MutexLocker mu(VMOperationQueue_lock);
|
||||
assert(Thread::current()->is_Java_thread(), "Should be a JavaThread");
|
||||
assert(((JavaThread*)Thread::current())->is_terminated(), "Should be terminated");
|
||||
{ MutexLockerEx mu(VMOperationQueue_lock, Mutex::_no_safepoint_check_flag);
|
||||
_should_terminate = true;
|
||||
VMOperationQueue_lock->notify();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue