sigx++  2.0.1
Protected Member Functions
sigx::threadable Class Reference

Derived classes denote that they are a thread wrapper. More...

#include <threadable.h>

Inheritance diagram for sigx::threadable:
sigx::manual_dispatchable sigx::dispatchable sigx::noncopyable sigx::glib_threadable

Protected Member Functions

virtual void on_startup ()
 Initialize thread specific stuff just before entering the thread's mainloop.
virtual void on_cleanup ()
 cleanup other stuff just after quitting the mainloop.
- Protected Member Functions inherited from sigx::manual_dispatchable
void set_dispatcher (dispatcher_ptr disp)
- Protected Member Functions inherited from sigx::dispatchable
 dispatchable ()
 ~dispatchable () throw ()
void invalidate_tunnels ()
 Invalidate those tunnels (and disconnect them from signals) that have registered themselves with add_dispatcher_change_notify_callback() when the validity tracking was activated.
dispatcher_ptr dispatcher () const throw ()
 non-volatile access to the dispatcher pointer in the current thread

Additional Inherited Members

- Public Types inherited from sigx::dispatchable
typedef void(* func_dispatcher_change_notify )(void *)
- Public Member Functions inherited from sigx::manual_dispatchable
 manual_dispatchable ()
virtual ~manual_dispatchable ()
- Protected Attributes inherited from sigx::dispatchable
internal::rwlockable_dispatcher_ptrm_disp_ptr

Detailed Description

Derived classes denote that they are a thread wrapper.

Additionally, since a threadable is a dispatchable, derived classes denote their ability to participate automatically in threadsafe messaging.

Member Function Documentation

virtual void sigx::threadable::on_cleanup ( )
inlineprotectedvirtual

cleanup other stuff just after quitting the mainloop.

This method gives derived classes the possibility to clean up their things like thread private data right after quitting the mainloop.

Note
The sigx::dispatchable baseclass still has a valid dispatcher reference and the thread's maincontext and mainloop are still valid, too.
Examples:
ipresolver/main.cpp.
virtual void sigx::threadable::on_startup ( )
inlineprotectedvirtual

Initialize thread specific stuff just before entering the thread's mainloop.

This method gives derived classes the possibility to initialize their things like thread private data or connecting to the idle signal (via mainloop()->signal_idle() in case of a glib_threadable) just before entering the mainloop.

Note
The sigx::dispatchable baseclass already has a valid dispatcher and the thread's maincontext and mainloop are already valid, too.
Examples:
ipresolver/main.cpp.

The documentation for this class was generated from the following file: