summaryrefslogtreecommitdiff
path: root/glib/glibmm/dispatcher.h
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2012-04-04 14:18:29 +0200
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2012-04-04 14:18:29 +0200
commit0f64aef58ac9d8ad1604800d3ba74bb998f63987 (patch)
tree7998f601d603162093624cd01533bfa79c301538 /glib/glibmm/dispatcher.h
parentac40deaa6e02797fb228e960dfff8c466f967c32 (diff)
downloadglibmm-0f64aef58ac9d8ad1604800d3ba74bb998f63987.tar.gz
Glib::Dispatcher: Don't send messages to a deleted Dispatcher.
* glib/glibmm/dispatcher.h: Add missing usage rules. * glib/glibmm/dispatcher.cc: Avoid delivering messages to deleted Dispatchers. Don't block message delivery while a second main loop is running. Bug #651942.
Diffstat (limited to 'glib/glibmm/dispatcher.h')
-rw-r--r--glib/glibmm/dispatcher.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/glib/glibmm/dispatcher.h b/glib/glibmm/dispatcher.h
index e92512f3..96721651 100644
--- a/glib/glibmm/dispatcher.h
+++ b/glib/glibmm/dispatcher.h
@@ -48,6 +48,9 @@ class DispatchNotifier;
* @li The Dispatcher object must be instantiated by the receiver thread.
* @li The Dispatcher object should be instantiated before creating any of the
* sender threads, if you want to avoid extra locking.
+ * @li The Dispatcher object must be deleted by the receiver thread.
+ * @li All Dispatcher objects instantiated by the same receiver thread must
+ * use the same main context.
*
* Notes about performance:
*
@@ -74,7 +77,7 @@ public:
* @throw Glib::FileError
*/
Dispatcher();
-
+
/** Create new Dispatcher instance using an arbitrary main context.
* @throw Glib::FileError
*/
@@ -88,7 +91,7 @@ public:
private:
sigc::signal<void> signal_;
- DispatchNotifier* notifier_;
+ DispatchNotifier* notifier_;
// noncopyable
Dispatcher(const Dispatcher&);