Function runWorkerTaskDist

Runs a new asynchronous task in all worker threads concurrently.

This function is mainly useful for long-living tasks that distribute their work across all CPU cores. Only function pointers with weakly isolated arguments are allowed to be able to guarantee thread-safety.

Prototypes

void runWorkerTaskDist(R, ARGS...)(
  R function(ARGS) func,
  ARGS args
);

void runWorkerTaskDist(alias method, T, ARGS...)(
  shared(T) object,
  ARGS args
);

Authors

Sönke Ludwig

Copyright

© 2012-2013 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.