Keep a maximum of 6 spare worker threads per Capability (#4262)
[ghc-hetmet.git] / rts / Schedule.c
index f6a9ef2..8e39814 100644 (file)
@@ -1607,7 +1607,8 @@ forkProcess(HsStablePtr *entry
        // Wipe our spare workers list, they no longer exist.  New
        // workers will be created if necessary.
        cap->spare_workers = NULL;
-       cap->returning_tasks_hd = NULL;
+        cap->n_spare_workers = 0;
+        cap->returning_tasks_hd = NULL;
        cap->returning_tasks_tl = NULL;
 #endif