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:
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user