Skip to content

Commit a73eca9

Browse files
pf0nWilliam Kemper
authored andcommitted
8383847: Shenandoah: gc/TestJNIWeak/TestJNIWeak.java times out intermittently
Reviewed-by: wkemper, ysr, kdnilsen
1 parent b74ab79 commit a73eca9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void ShenandoahControlThread::run_service() {
6868

6969
// Figure out if we have pending requests.
7070
const bool alloc_failure_pending = ShenandoahCollectorPolicy::is_allocation_failure(cancelled_cause);
71-
const bool is_gc_requested = _gc_requested.is_set();
71+
const bool is_gc_requested = _gc_requested.try_unset();
7272
const GCCause::Cause requested_gc_cause = _requested_gc_cause;
7373

7474
// Choose which GC mode to run in. The block below should select a single mode.
@@ -406,7 +406,6 @@ void ShenandoahControlThread::handle_requested_gc(GCCause::Cause cause) {
406406
}
407407

408408
void ShenandoahControlThread::notify_gc_waiters() {
409-
_gc_requested.unset();
410409
MonitorLocker ml(&_gc_waiters_lock);
411410
ml.notify_all();
412411
}

0 commit comments

Comments
 (0)