Frees all resources allocated for
TRUE, no new task is processed for
pool is not freed before the last task is processed.
Note however, that no thread of this pool is interrupted while
processing a task. Instead at least all still running threads
can finish their tasks before the
pool is freed.
TRUE, this function does not return before all
tasks to be processed (dependent on
immediate, whether all
or only the currently running) are ready.
Otherwise this function returns immediately.
After calling this function
pool must not be used anymore.