piranha
0.10
|
Class to store a list of futures. More...
#include <piranha/thread_pool.hpp>
Public Member Functions | |
future_list ()=default | |
Defaulted default constructor. More... | |
future_list (const future_list &)=delete | |
Deleted copy constructor. | |
future_list (future_list &&)=delete | |
Deleted move constructor. | |
~future_list () | |
Destructor. More... | |
void | push_back (std::future< T > &&f) |
Move-insert a future. More... | |
void | wait_all () |
Wait on all the futures. More... | |
void | get_all () |
Get all the futures. More... | |
Class to store a list of futures.
This class is a minimal thin wrapper around an std::list
of std::future<T>
objects. The class provides convenience methods to interact with the set of futures in an exception-safe manner.
Definition at line 513 of file thread_pool.hpp.
|
default |
Defaulted default constructor.
This constructor will initialise an empty list of futures.
|
inline |
|
inline |
Get all the futures.
This method will call get()
on all the valid futures stored within the object. The return values resulting from the calls to get()
will be ignored.
unspecified | an exception stored by a future. |
Definition at line 597 of file thread_pool.hpp.
|
inline |
Move-insert a future.
Will move-insert the input future f
into the internal container. If the insertion fails due to memory allocation errors and f
is a valid future, then the method will wait on f
before throwing the exception.
f | std::future to be move-inserted. |
unspecified | any exception thrown by memory allocation errors. |
Definition at line 561 of file thread_pool.hpp.
|
inline |
Wait on all the futures.
This method will call wait()
on all the valid futures stored within the object.
Definition at line 582 of file thread_pool.hpp.