Type-erasure for future-like objects. A future-like object is a object satisfying the interface of FutureBase.
More...
#include <dune/common/parallel/future.hh>
|
template<class F > |
| Future (F &&f) |
|
template<class U , std::enable_if_t< std::is_same< U, T >::value &&!std::is_same< T, void >::value > > |
| Future (U &&data) |
|
| Future ()=default |
|
void | wait () |
| wait until the future is ready
|
|
T | get () |
| Waits until the future is ready and returns the resulting value.
|
|
bool | ready () const |
|
bool | valid () const |
| Checks whether the future is valid. I.e. ‘get()’ was not called on that future and when it was not default-constructed and not moved from.
|
|
template<class T>
class Dune::Future< T >
Type-erasure for future-like objects. A future-like object is a object satisfying the interface of FutureBase.
◆ Future() [1/3]
template<class T >
template<class F >
◆ Future() [2/3]
template<class T >
template<class U , std::enable_if_t< std::is_same< U, T >::value &&!std::is_same< T, void >::value > >
◆ Future() [3/3]
◆ get()
Waits until the future is ready and returns the resulting value.
- Returns
- The contained value
- Exceptions
-
◆ ready()
- Returns
- true is the future is ready, otherwise false
- Exceptions
-
◆ valid()
Checks whether the future is valid. I.e. ‘get()’ was not called on that future and when it was not default-constructed and not moved from.
- Returns
- true is the future is valid, otherwise false
◆ wait()
wait until the future is ready
- Exceptions
-
The documentation for this class was generated from the following file: