Signals worker threads to terminate when the queue becomes empty.
If blocking argument is true, wait for all worker threads to terminate
before returning. This option might be used in applications where
task results are never consumed-- e.g. when TaskPool is employed as a
rudimentary scheduler for tasks which communicate by means other than
return values.
Warning: Calling this function with blocking = true from a worker
thread that is a member of the same TaskPool that
finish is being called on will result in a deadlock.
Signals worker threads to terminate when the queue becomes empty.
If blocking argument is true, wait for all worker threads to terminate before returning. This option might be used in applications where task results are never consumed-- e.g. when TaskPool is employed as a rudimentary scheduler for tasks which communicate by means other than return values.
Warning: Calling this function with blocking = true from a worker thread that is a member of the same TaskPool that finish is being called on will result in a deadlock.