Add concurrent execution helper to Worker

Concurrently executing a task on all workers *and* waiting until
all workers have executed the task seems to be common enough to
warrant a helper function for that purpose.
This commit is contained in:
Johan Wikman
2017-04-29 08:22:32 +03:00
parent bfd94c2b31
commit 1b58a75f42
2 changed files with 18 additions and 0 deletions

View File

@ -338,6 +338,16 @@ public:
*/
static size_t execute_on_all_serially(Task* pTask);
/**
* Executes a task on all workers concurrently and waits until
* all workers are done.
*
* @param pTask The task to be executed.
*
* @return How many workers the task was posted to.
*/
static size_t execute_on_all_concurrently(Task* pTask);
/**
* Post a message to a worker.
*