![]() |
![]() |
Public Member Functions | |
Dispatcher () | |
Create new Dispatcher instance using the default main context. | |
Dispatcher (const Glib::RefPtr<MainContext>& context) | |
Create new Dispatcher instance using an arbitrary main context. | |
~Dispatcher () | |
void | emit () |
void | operator() () |
sigc::connection | connect (const sigc::slot<void>& slot) |
Glib::Dispatcher works similar to sigc::signal<void>. But unlike normal signals, the notification happens asynchronously through a pipe. This is a simple and efficient way of communicating between threads, and especially useful in a thread model with a single GUI thread.
No mutex locking is involved, apart from the operating system's internal I/O locking. That implies some usage rules:
write()
system call.
Glib::Dispatcher::Dispatcher | ( | ) |
Glib::Dispatcher::Dispatcher | ( | const Glib::RefPtr<MainContext>& | context | ) | [explicit] |
Glib::Dispatcher::~Dispatcher | ( | ) |
void Glib::Dispatcher::emit | ( | ) |
void Glib::Dispatcher::operator() | ( | ) |
sigc::connection Glib::Dispatcher::connect | ( | const sigc::slot< void > & | slot | ) |