When acquiring a spinlock, yieldThread() every 1000 spins (#3553, #3758)
[ghc-hetmet.git] / rts / sm / GC.c
index 3bd5017..2eabdab 100644 (file)
@@ -997,6 +997,9 @@ any_work (void)
 #endif
 
     gct->no_work++;
+#if defined(THREADED_RTS)
+    yieldThread();
+#endif
 
     return rtsFalse;
 }