|
sigx++ 2.0.1
|
base class denoting the ability to dispatch messages between threads. More...
#include <dispatcher.h>
Public Member Functions | |
| dispatcher () | |
| constructs the dispatcher | |
| virtual | ~dispatcher ()=0 |
| virtual void | send (tunnel_context_base *context) |
| puts the tunnel context into the list of messages to dispatch | |
| gint | queued_contexts () const |
| threadhandle_type | creator_thread () const |
Static Public Attributes | |
| static bool | deadlock_detection = false |
| Whether deadlock detection is turned on. | |
Protected Member Functions | |
| bool | process_next () |
| processes the next message in the queue. | |
| void | test_calling_thread () |
base class denoting the ability to dispatch messages between threads.
A dispatcher holds a list of pointers to sigx::tunnel_context objects.
| sigx::dispatcher::dispatcher | ( | ) |
constructs the dispatcher
| sigx::dispatcher::~dispatcher | ( | ) | [pure virtual] |
| bad_caller |
References test_calling_thread().
| threadhandle_type sigx::dispatcher::creator_thread | ( | ) | const [inline] |
| bool sigx::dispatcher::process_next | ( | ) | [protected] |
processes the next message in the queue.
References sigx::tunnel_context_base::creator_thread(), deadlock_detection, sigx::tunnel_context_base::invoke(), sigx::tunnel_context_base::is_sync(), sigx::tunnel_context_base::is_valid(), and sigx::dld::make_thread_pair().
Referenced by sigx::glib_dispatcher::~glib_dispatcher().
| gint sigx::dispatcher::queued_contexts | ( | ) | const |
| void sigx::dispatcher::send | ( | tunnel_context_base * | context | ) | [virtual] |
puts the tunnel context into the list of messages to dispatch
Reimplemented in sigx::glib_dispatcher.
References deadlock_detection, sigx::tunnel_context_base::is_sync(), and sigx::dld::make_thread_pair().
| void sigx::dispatcher::test_calling_thread | ( | ) | [protected] |
| bad_caller |
Referenced by ~dispatcher(), and sigx::glib_dispatcher::~glib_dispatcher().
bool sigx::dispatcher::deadlock_detection = false [static] |
Whether deadlock detection is turned on.
Set to `true" from the main thread (e.g. after Glib::thread_init()) to turn on the deadlock detection feature at runtime for synchronous messages. Defaults to false.
Referenced by process_next(), and send().
1.7.4