diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-12-28 10:14:17 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-12-28 10:14:17 -0500 |
commit | 0d9efc11484c901795ff4e9549a1a39715d0474d (patch) | |
tree | 956ab3cd570670bcb1ff68856553f5aec4a8e470 /libs/gtkmm2ext | |
parent | db4834027858b10f313c822c7fb3fad1617f11aa (diff) |
redesign cross-thread registration/signalling system
This new design will work even when threads that need to receive
messages from RT threads are created *after* the RT threads. The
existing design would fail because the RT thread(s) would never
be known the later created threads, and so signals emitted by the
RT thread and causing call_slot() in the receiver would end up
being enqueued using a lock-protected list. The new design ensures
that communication always uses a lock-free FIFO instead
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index ca4d6681dc..538bf8d63f 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -98,6 +98,10 @@ UI::UI (string namestr, int *argc, char ***argv) set_event_loop_for_thread (this); + /* we will be receiving requests */ + + EventLoop::register_request_buffer_factory ("gui", request_buffer_factory); + /* attach our request source to the default main context */ attach_request_source (); |