src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
changeset 58190 9adf95692a3d
parent 58059 baa4dd528de0
child 58199 595fcbebaa77
child 58231 13e041be4e5c
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Tue Sep 17 20:38:23 2019 +0800
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Tue Sep 17 08:22:14 2019 -0400
@@ -1920,7 +1920,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());