summaryrefslogtreecommitdiffstats
path: root/base/message_pump_glib.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/message_pump_glib.h')
-rw-r--r--base/message_pump_glib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/message_pump_glib.h b/base/message_pump_glib.h
index d632095..19d2ecd 100644
--- a/base/message_pump_glib.h
+++ b/base/message_pump_glib.h
@@ -64,6 +64,14 @@ class MessagePumpForUI : public MessagePump {
// the message pump is destroyed.
GSource* work_source_;
+ // We use a wakeup pipe to make sure we'll get out of the glib polling phase
+ // when another thread has scheduled us to do some work. There is a glib
+ // mechanism g_main_context_wakeup, but this won't guarantee that our event's
+ // Dispatch() will be called.
+ int wakeup_pipe_read_;
+ int wakeup_pipe_write_;
+ GPollFD wakeup_gpollfd_;
+
DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
};