- recent_activity = ACTIVITY_INACTIVE;
- blackholes_need_checking = rtsTrue;
- /* hack: re-use the blackholes_need_checking flag */
- threadRunnable();
- /* ToDo: this threadRunnable only works if there's
- * another thread (not this one) waiting to be woken up
- */
+ if (ticks_to_gc == 0) break; /* 0 ==> no idle GC */
+ ticks_to_gc--;
+ if (ticks_to_gc == 0) {
+ ticks_to_gc = RtsFlags.GcFlags.idleGCDelayTicks;
+ recent_activity = ACTIVITY_INACTIVE;
+ blackholes_need_checking = rtsTrue;
+ /* hack: re-use the blackholes_need_checking flag */
+ threadRunnable();
+ /* ToDo: this threadRunnable only works if there's
+ * another thread (not this one) waiting to be woken up
+ */
+ }