#include <future.h>
Public Member Functions | |
virtual void * | get ()=0 |
This method will block current thread until the result is available. | |
virtual bool | get (int milli, void **result=NULL)=0 |
this method will block current thread until result becomes available or timeout is reached. | |
virtual | ~Future () |
Since the Runnable object can run in other threads, it's very possible that its return value is not availabe to its caller. It's convenient to have a class to represent the future result of Runnable objects.
virtual amino::Future::~Future | ( | ) | [inline, virtual] |
virtual void* amino::Future::get | ( | ) | [pure virtual] |
This method will block current thread until the result is available.
TODO: Make this a template member function so that it can return any type?
Implemented in amino::AbstractFuture.
virtual bool amino::Future::get | ( | int | milli, | |
void ** | result = NULL | |||
) | [pure virtual] |
this method will block current thread until result becomes available or timeout is reached.
milli | timout value in milli-second | |
result | this pointer is used to return result of Runnable.run() method |
Implemented in amino::AbstractFuture.