Commit ac548e9f authored by Simon Marlow's avatar Simon Marlow
Browse files

shutdownCapability(): don't bail out after 50 iterations

See comments for details.  Fixes assertion failures in stage 3 build
which appeared after recent closeMutex() addidion.  May fix other
shutdown issues.
parent 4cfe37a2
......@@ -646,7 +646,13 @@ shutdownCapability (Capability *cap, Task *task)
task->cap = cap;
for (i = 0; i < 50; i++) {
// Loop indefinitely until all the workers have exited and there
// are no Haskell threads left. We used to bail out after 50
// iterations of this loop, but that occasionally left a worker
// running which caused problems later (the closeMutex() below
// isn't safe, for one thing).
for (i = 0; /* i < 50 */; i++) {
"shutting down capability %d, attempt %d", cap->no, i);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment