Keep a maximum of 6 spare worker threads per Capability (#4262)
[ghc-hetmet.git] / rts / Capability.h
index a32062a..a15ce15 100644 (file)
@@ -79,6 +79,7 @@ struct Capability_ {
 #if defined(THREADED_RTS)
     // Worker Tasks waiting in the wings.  Singly-linked.
     Task *spare_workers;
+    nat n_spare_workers; // count of above
 
     // This lock protects running_task, returning_tasks_{hd,tl}, wakeup_queue.
     Mutex lock;