Re: Running dbus_connection_read_write_dispatch in a separate thread

Alexandru Sorodoc <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
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
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dbus

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.