Skip to content

Commit

Permalink
Provide TaskGroup::size().
Browse files Browse the repository at this point in the history
  • Loading branch information
bangerth committed Jan 7, 2020
1 parent eb08b94 commit 6eb1dde
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/deal.II/base/thread_management.h
Expand Up @@ -1824,6 +1824,21 @@ namespace Threads
return *this;
}


/**
* Return how many tasks have been put into this group. This
* function does not distinguish how many of these tasks have
* already run and have finished, are still waiting to be
* scheduled to a CPU resource, or are currently running. Tasks
* that have been joined already are also still counted.
*/
std::size_t
size() const
{
return tasks.size();
}


/**
* Wait for all tasks in the collection to finish. It is not a problem if
* some of them have already been waited for, i.e. you may call this
Expand Down

0 comments on commit 6eb1dde

Please sign in to comment.