#include <gridfutureimpl.hpp>
Public Member Functions | |
| GridFutureImpl (TGridThreadPoolPtr &threadPool) | |
| virtual bool | success () const |
| virtual T | result () const |
| virtual T | get () |
| virtual T | get (const boost::posix_time::time_duration &timeout) |
| void | task (boost::packaged_task< T > &pt) |
Generic future implementation.
| GridFutureImpl< T >::GridFutureImpl | ( | TGridThreadPoolPtr & | threadPool | ) | [inline] |
Default constructor.
| virtual T GridFutureImpl< T >::get | ( | ) | [inline, virtual] |
Waits for future to complete and fills success and result values.
Implements GridClientFuture< T >.
| virtual T GridFutureImpl< T >::get | ( | const boost::posix_time::time_duration & | timeout | ) | [inline, virtual] |
Waits for future to finish and returns the result of operation.
| timeout | Time to wait for result. |
| GridClientException | In case an operation has thrown exception (it is rethrown). | |
| GridClientFutureTimeoutException | If timed out before future finishes. |
Implements GridClientFuture< T >.
| virtual T GridFutureImpl< T >::result | ( | ) | const [inline, virtual] |
Result of operation. If the operation was not successful, it is not valid.
Implements GridClientFuture< T >.
| virtual bool GridFutureImpl< T >::success | ( | ) | const [inline, virtual] |
Was the operation successful or not. If it was not successful, result is not valid.
Implements GridClientFuture< T >.
| void GridFutureImpl< T >::task | ( | boost::packaged_task< T > & | pt | ) | [inline] |
Init future from Boost packaged task with typed return type.
| pt | Packaged task to use for this future. |
1.7.1