Add closeMutex and use it on clean up
[ghc-hetmet.git] / rts / Capability.c
index 2384262..e384e1e 100644 (file)
@@ -671,6 +671,9 @@ shutdownCapability (Capability *cap, Task *task)
     }
     // we now have the Capability, its run queue and spare workers
     // list are both empty.
+
+    // We end up here only in THREADED_RTS
+    closeMutex(&cap->lock);
 }
 
 /* ----------------------------------------------------------------------------