# Functions
Done should be called on threads routine exit to notify Wait that thread has
* finished*/.
Initiate notifies threads of program's intent to terminate*/Should be called by one thread only.
InitiateAndWait is a helper which is often used in tests, where we want to
Initiate shutdown and Wait program to shutdown on function exit*/.
Initiated is used by threads to check if program is being terminated*/.
InitiatedCh is used by threads to receive terminate notification from channel*/.
NumProcs returns number of currently running threads*/.
Register thread so that Wait function will wait for it terminationRegister should be called before starting threads routine.
Setup initializes shutdown framework.
Wait waits for all the registered threads to terminate*/.
# Variables
Context will be canceled when Initiate is called*/.