Skip to content
Snippets Groups Projects
Commit 68b76e0e authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Rearrange shutdownCapability code slightly

This is mostly for the beneift of having sensible places to put tracing
code later. We want a code path that has somewhere to trace (in order):
 (1) starting up all capabilities;
 (2) N * starting up an individual capability;
 (3) N * shutting down an individual capability;
 (4) shutting down all capabilities.
This has to work in both threaded and non-threaded modes.

Locations (1) and (2) are provided by initCapabilities and
initCapability respectively. Previously, there was no loccation for (4)
and while shutdownCapability should be usable for (3) it was only called
in the !THREADED_RTS case.

Now, shutdownCapability is called unconditionally (and the body is
conditonal on THREADED_RTS) and there is a new shutdownCapabilities that
calls shutdownCapability in a loop.
parent cb2d37da
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment