#include <task.hpp>
Public Types | |
typedef task_base::state | state |
Brief description starts here. | |
Public Member Functions | |
task (saga::task_base::state t=saga::task_base::New) | |
Brief description starts here. | |
~task () | |
Destroys the object. | |
void | run (void) |
Starts the asynchronous operation. | |
void | cancel (void) |
Cancels the asynchronous operation. | |
bool | wait (double timeout=-1.0) |
Waits for the task to finish. | |
state | get_state () |
Gets the state of the task. | |
void | rethrow () |
Re-throws any exception a failed task caught. | |
saga::object | get_object () const |
Gets the object from which this task was created. | |
template<typename Retval> | |
Retval & | get_result () |
Gets the result of the asynchronous operation. | |
template<typename Retval> | |
Retval const & | get_result () const |
void | get_result () |
Synchronization for API functions with no return value only. | |
void | get_result () const |
Friends | |
bool | operator== (task const &lhs, task const &rhs) |
Brief description starts here. |
/*! Operations performed in highly heterogeneous distributed environments may take a long time to complete, and it is thus desirable to have the ability to perform operations in an asynchronous manner. The SAGA task model provides this ability to all other SAGA classes.
typedef task_base::state saga::task::state |
saga::task::task | ( | saga::task_base::state | t = saga::task_base::New |
) | [explicit] |
Brief description starts here.
saga::task::~task | ( | void | ) |
Destroys the object.
void saga::task::run | ( | void | ) |
void saga::task::cancel | ( | void | ) |
bool saga::task::wait | ( | double | timeout = -1.0 |
) |
Waits for the task to finish.
timeout | Second to wait |
Reimplemented in saga::job::job.
task::state saga::task::get_state | ( | void | ) |
Gets the state of the task.
Reimplemented in saga::job::job.
Referenced by get_result(), and rethrow().
void saga::task::rethrow | ( | ) |
saga::object saga::task::get_object | ( | ) | const |
void saga::task::get_result | ( | ) | [inline] |
Gets the result of the asynchronous operation.
References saga::task_base::Failed, get_state(), and saga::NoSuccess.
Referenced by saga::cpr::checkpoint::add_file(), saga::cpr::job::cpr_list(), saga::name_space::directory::get_entry(), saga::cpr::checkpoint::get_file(), saga::cpr::directory::get_file_num(), saga::detail::permissions< saga::job::job >::get_group(), saga::name_space::directory::get_num_entries(), saga::detail::permissions< saga::job::job >::get_owner(), saga::cpr::directory::get_parent(), saga::name_space::directory::is_dir(), saga::name_space::directory::is_entry(), saga::name_space::directory::is_link(), saga::cpr::checkpoint::list_files(), saga::name_space::directory::make_dir(), saga::name_space::directory::move(), saga::name_space::directory::open(), saga::advert::directory::open(), saga::advert::directory::open_dir(), saga::cpr::checkpoint::open_file(), saga::job::service::run_job(), saga::cpr::checkpoint::stage_file(), and saga::cpr::directory::update_file().
void saga::task::get_result | ( | ) | const [inline] |
References saga::task_base::Failed, get_state(), and saga::NoSuccess.
void saga::task::get_result | ( | ) |
Synchronization for API functions with no return value only.
void saga::task::get_result | ( | ) | const |