#include <thread.hpp>

Public Types | |
| enum | RESULT { COMPLETED, ABORTED } |
Public Member Functions | |
| async_operation () | |
| virtual | ~async_operation () |
| RESULT | execute (async_operation_ptr this_ptr, waiter &wait) |
| mutex & | get_mutex () |
| virtual void | run ()=0 |
| bool | notify_finished () |
| bool | is_aborted () const |
Private Attributes | |
| boost::scoped_ptr< thread > | thread_ |
| bool | aborted_ |
| condition | finished_ |
| bool | finishedVar_ |
| mutex | mutex_ |
Static Private Attributes | |
| static active_operation_list | active_ |
Definition at line 214 of file thread.hpp.
Definition at line 218 of file thread.hpp.
| threading::async_operation::async_operation | ( | ) | [inline] |
Definition at line 220 of file thread.hpp.
References active_.
| virtual threading::async_operation::~async_operation | ( | ) | [inline, virtual] |
Definition at line 226 of file thread.hpp.
| async_operation::RESULT threading::async_operation::execute | ( | async_operation_ptr | this_ptr, | |
| waiter & | wait | |||
| ) |
Definition at line 152 of file thread.cpp.
References aborted_, active_, finished_, finishedVar_, get_mutex(), threading::waiter::process(), run_async_operation(), thread_, threading::condition::WAIT_ERROR, threading::condition::WAIT_OK, and threading::condition::wait_timeout().

| mutex& threading::async_operation::get_mutex | ( | ) | [inline] |
Definition at line 230 of file thread.hpp.
References mutex_.
Referenced by execute().

| bool threading::async_operation::is_aborted | ( | ) | const [inline] |
Definition at line 241 of file thread.hpp.
References aborted_.
| bool threading::async_operation::notify_finished | ( | ) |
Definition at line 145 of file thread.cpp.
References finished_, finishedVar_, and threading::condition::notify_one().

| virtual void threading::async_operation::run | ( | ) | [pure virtual] |
bool threading::async_operation::aborted_ [private] |
Definition at line 245 of file thread.hpp.
Referenced by execute(), and is_aborted().
active_operation_list threading::async_operation::active_ [static, private] |
Definition at line 250 of file thread.hpp.
Referenced by async_operation(), and execute().
Definition at line 246 of file thread.hpp.
Referenced by execute(), and notify_finished().
bool threading::async_operation::finishedVar_ [private] |
Definition at line 247 of file thread.hpp.
Referenced by execute(), and notify_finished().
mutex threading::async_operation::mutex_ [private] |
Definition at line 248 of file thread.hpp.
Referenced by get_mutex().
boost::scoped_ptr<thread> threading::async_operation::thread_ [private] |
Definition at line 244 of file thread.hpp.
Referenced by execute().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:11 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |