Re: Running dbus_connection_read_write_dispatch in a separate thread
Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Tue, 16 Jun 2020 18:06:34 +0300, Alexandru Sorodoc wrote: > All works fine, but when I want to shutdown the daemon I call > dbus_connection_close from the main thread but > dbus_connection_read_write_dispatch (running in the other thread) > never returns unless it receives a dbus message. Best to keep all your libdbus calls on a single thread, managed as part of your main event loop. This is easier if you use dbus_connection_dispatch() rather than dbus_connection_read_write_dispatch(). If you want an example you can copy, try this <https://github.com/ldo/slow_dbus_server>. _______________________________________________ dbus mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dbus