activemq-cpp-3.4.0
|
A task that returns a result and may throw an exception. More...
#include <src/main/decaf/util/concurrent/Callable.h>
Public Member Functions | |
virtual | ~Callable () |
virtual V | call ()=0 |
Computes a result, or throws an exception if unable to do so. |
A task that returns a result and may throw an exception.
Implementors define a single method with no arguments called call. This interface differs from the Runnable interface in that a Callable object can return a result and is allowed to throw an exceptions from its call method.
The Executors class contains utility methods to convert from other common forms to Callable classes.
virtual decaf::util::concurrent::Callable< V >::~Callable | ( | ) | [inline, virtual] |
virtual V decaf::util::concurrent::Callable< V >::call | ( | ) | [pure virtual] |
Computes a result, or throws an exception if unable to do so.
Exception | If unable to compute a result. |