src/share/vm/runtime/thread.cpp

changeset 721
3529d0e8d09c
parent 677
d95b224e9f17
child 758
b33eef719520
child 795
5d254928c888
     1.1 --- a/src/share/vm/runtime/thread.cpp	Wed Aug 13 08:56:44 2008 -0400
     1.2 +++ b/src/share/vm/runtime/thread.cpp	Fri Aug 15 10:08:20 2008 -0700
     1.3 @@ -2756,7 +2756,13 @@
     1.4    // For now, just manually iterate through them.
     1.5    tc->do_thread(VMThread::vm_thread());
     1.6    Universe::heap()->gc_threads_do(tc);
     1.7 -  tc->do_thread(WatcherThread::watcher_thread());
     1.8 +  {
     1.9 +    // Grab the Terminator_lock to prevent watcher_thread from being terminated.
    1.10 +    MutexLockerEx mu(Terminator_lock, Mutex::_no_safepoint_check_flag);
    1.11 +    WatcherThread *wt = WatcherThread::watcher_thread();
    1.12 +    if (wt != NULL)
    1.13 +      tc->do_thread(wt);
    1.14 +  }
    1.15    // If CompilerThreads ever become non-JavaThreads, add them here
    1.16  }
    1.17  

mercurial