#include <thread.hpp>
Public Types | |
enum | RESULT { COMPLETED, ABORTED } |
Public Member Functions | |
async_operation () | |
virtual | ~async_operation () |
RESULT | execute (waiter &wait) |
mutex & | get_mutex () |
virtual void | run ()=0 |
bool | notify_finished () |
bool | is_aborted () const |
Private Attributes | |
bool | aborted_ |
condition | finished_ |
bool | finishedVar_ |
mutex | mutex_ |
Definition at line 202 of file thread.hpp.
threading::async_operation::async_operation | ( | ) | [inline] |
Definition at line 208 of file thread.hpp.
virtual threading::async_operation::~async_operation | ( | ) | [inline, virtual] |
Definition at line 210 of file thread.hpp.
async_operation::RESULT threading::async_operation::execute | ( | waiter & | wait | ) |
Definition at line 161 of file thread.cpp.
References ABORTED, aborted_, COMPLETED, finished_, finishedVar_, get_mutex(), threading::waiter::process(), run_async_operation(), threading::waiter::WAIT, threading::condition::WAIT_ERROR, threading::condition::WAIT_OK, and threading::condition::wait_timeout().
mutex& threading::async_operation::get_mutex | ( | ) | [inline] |
Definition at line 214 of file thread.hpp.
References mutex_.
Referenced by execute(), and run_async_operation().
virtual void threading::async_operation::run | ( | ) | [pure virtual] |
Referenced by run_async_operation().
bool threading::async_operation::notify_finished | ( | ) |
Definition at line 155 of file thread.cpp.
References finished_, finishedVar_, and threading::condition::notify_one().
Referenced by run_async_operation().
bool threading::async_operation::is_aborted | ( | ) | const [inline] |
Definition at line 225 of file thread.hpp.
References aborted_.
Referenced by run_async_operation().
bool threading::async_operation::aborted_ [private] |
bool threading::async_operation::finishedVar_ [private] |
mutex threading::async_operation::mutex_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |