Skip to content
Permalink
Browse files
8270869: G1ServiceThread may not terminate
Reviewed-by: ayang, tschatzl
  • Loading branch information
Kim Barrett committed Jul 20, 2021
1 parent c3519c3 commit 7f35e5bac9925c06985f16d225f5dd9c50157d06
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/hotspot/share/gc/g1/g1ServiceThread.cpp
@@ -112,12 +112,10 @@ void G1ServiceThread::notify() {
}

void G1ServiceThread::sleep_before_next_cycle() {
MonitorLocker ml(&_monitor, Mutex::_no_safepoint_check_flag);
if (should_terminate()) {
return;
}

MonitorLocker ml(&_monitor, Mutex::_no_safepoint_check_flag);
if (_task_queue.is_empty()) {
} else if (_task_queue.is_empty()) {
// Sleep until new task is registered if no tasks available.
log_trace(gc, task)("G1 Service Thread (wait for new tasks)");
ml.wait(0);

1 comment on commit 7f35e5b

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 7f35e5b Jul 20, 2021

Please sign in to comment.