TaskPool.runTaskDist

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.

The number of tasks started is guaranteed to be equal to threadCount.

  1. void runTaskDist(FT func, ARGS args)
  2. void runTaskDist(shared(T) object, ARGS args)
    class TaskPool
    void
    runTaskDist
    (
    alias method
    T
    ARGS...
    )
    (
    shared(T) object
    ,
    auto ref ARGS args
    )
  3. void runTaskDist(TaskSettings settings, FT func, ARGS args)
  4. void runTaskDist(TaskSettings settings, shared(T) object, ARGS args)

Meta