<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="DejaVu Sans">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</font> call until I get to do
things properly.<br>
<br>
Thanks for all the help,<br>
Alex</p>
<div class="moz-cite-prefix">On 6/17/20 1:55 AM, Lawrence D'Oliveiro
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20200617105519.082a7dd1@theon.geek-central.gen.nz">
<pre class="moz-quote-pre" wrap="">On Tue, 16 Jun 2020 18:06:34 +0300, Alexandru Sorodoc wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
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 <a class="moz-txt-link-rfc2396E" href="https://github.com/ldo/slow_dbus_server"><https://github.com/ldo/slow_dbus_server></a>.
_______________________________________________
dbus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/dbus">https://lists.freedesktop.org/mailman/listinfo/dbus</a>
</pre>
</blockquote>
</body>
</html>