View source code
Display the source code in std/parallelism.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.parallelism.TaskPool.finish
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
is employed as a
rudimentary scheduler for tasks which communicate by means other than
return values.
TaskPool
Prototype
void finish( bool blocking = false ) @trusted;
Warning
Calling this function with
from a worker
thread that is a member of the same blocking
= true
that
TaskPool
is being called on will result in a deadlock.
finish