Running dbus_connection_read_write_dispatch in a separate thread

Alexandru Sorodoc ealex95 at gmail.com
Wed Jun 17 17:37:53 UTC 2020


I will do that eventually, but for now I just want something as minimal 
as possible. I will just set a timeout to the read_write_dispatch call 
until I get to do things properly.

Thanks for all the help,
Alex

On 6/17/20 1:55 AM, Lawrence D'Oliveiro wrote:
> 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
> dbus at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dbus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20200617/30ae84c3/attachment.htm>


More information about the dbus mailing list