src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
branchstuefe-new-metaspace-branch
changeset 58199 595fcbebaa77
parent 58063 bdf136b8ae0e
parent 58190 9adf95692a3d
child 58494 54c1ba464b78
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Thu Sep 12 15:04:00 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Wed Sep 18 07:46:02 2019 +0200
@@ -1922,7 +1922,7 @@
     else if (prev == CANCELLED) return false;
     assert(ShenandoahSuspendibleWorkers, "should not get here when not using suspendible workers");
     assert(prev == NOT_CANCELLED, "must be NOT_CANCELLED");
-    {
+    if (Thread::current()->is_Java_thread()) {
       // We need to provide a safepoint here, otherwise we might
       // spin forever if a SP is pending.
       ThreadBlockInVM sp(JavaThread::current());