|
Antares Simulator
Power System Simulator
|
Utility class to gather futures to wait for. More...
#include <concurrency.h>
Public Member Functions | |
| FutureSet (const FutureSet &)=delete | |
| FutureSet & | operator= (const FutureSet &)=delete |
| FutureSet (FutureSet &&)=delete | |
| FutureSet & | operator= (FutureSet &&)=delete |
| void | add (TaskFuture &&f) |
| Adds one future to be monitored by this set. More... | |
| void | join () |
| Waits for completion of all added futures. More... | |
Utility class to gather futures to wait for.
| void Antares::Concurrency::FutureSet::add | ( | TaskFuture && | f | ) |
Adds one future to be monitored by this set.
Note: the provided future will be left in "moved from" state.
| void Antares::Concurrency::FutureSet::join | ( | ) |
Waits for completion of all added futures.
If one of the future ends on exception, re-throws the first encountered exception. Note that futures cannot be added while some thread is waiting for completion.
Joining also resets the list of tasks to wait for.