src/hotspot/share/runtime/thread.cpp
changeset 52386 e256b3b62e20
parent 52341 2b58b8e1d28f
child 52431 b0af758a092c
equal deleted inserted replaced
52385:5c679ec60888 52386:e256b3b62e20
  4284     // heap is unparseable if they are caught. Grab the Heap_lock
  4284     // heap is unparseable if they are caught. Grab the Heap_lock
  4285     // to prevent this. The GC vm_operations will not be able to
  4285     // to prevent this. The GC vm_operations will not be able to
  4286     // queue until after the vm thread is dead. After this point,
  4286     // queue until after the vm thread is dead. After this point,
  4287     // we'll never emerge out of the safepoint before the VM exits.
  4287     // we'll never emerge out of the safepoint before the VM exits.
  4288 
  4288 
  4289     MutexLocker ml(Heap_lock);
  4289     MutexLockerEx ml(Heap_lock, Mutex::_no_safepoint_check_flag);
  4290 
  4290 
  4291     VMThread::wait_for_vm_thread_exit();
  4291     VMThread::wait_for_vm_thread_exit();
  4292     assert(SafepointSynchronize::is_at_safepoint(), "VM thread should exit at Safepoint");
  4292     assert(SafepointSynchronize::is_at_safepoint(), "VM thread should exit at Safepoint");
  4293     VMThread::destroy();
  4293     VMThread::destroy();
  4294   }
  4294   }