<br><br><div class="gmail_quote">On Fri, Mar 11, 2011 at 10:37 AM, Simon McVittie <span dir="ltr">&lt;<a href="mailto:simon.mcvittie@collabora.co.uk">simon.mcvittie@collabora.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 11 Mar 2011 at 10:24:21 -0300, Marcus Nascimento wrote:<br>
&gt; I&#39;ve been having some trouble running dbus glib (server or client) on a<br>
&gt; GMainContext other than the default one.<br>
<br>
</div>Your patch looks reasonable at first glance; if you want to add this<br>
functionality, please open an &#39;enhancement&#39;-severity bug on <a href="http://freedesktop.org" target="_blank">freedesktop.org</a><br>
to track it (or reuse an existing one if it would fix an existing bug). If<br>
possible we prefer patches in the format produced by git format-patch, so we<br>
can preserve attribution.<br>
<br>
Potentially-relevant bugs include:<br>
    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23633" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=23633</a><br>
    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=35115" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=35115</a><br>
<br></blockquote><div><br></div><div>I&#39;ll look for that as soon as I have some time available.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The reason I&#39;m not particularly enthusiastic about merging this is that GDBus<br>
(in GLib &gt;= 2.26) is probably a better choice for new GObject D-Bus code,<br>
particularly in the presence of threads. dbus-glib has various design flaws<br>
and, in practice, mostly isn&#39;t thread-safe.<br>
<br>
If you&#39;re doing this for multi-threading support, please look at the list of<br>
dbus/dbus-glib bugs that mention threads and consider whether you really want<br>
to be doing that, and are able to debug the results...<br>
<br></blockquote><div><br></div><div>That worries me out!</div><div>I&#39;m designing a portable lib for embedded (and non-embedded) use.</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">It has 2 dbus clients receiving signals from 2 dbus servers.</div>
<div>I&#39;m facing a lot of thread issues with glib-dbus.</div><div><br></div><div>The major one: I can&#39;t start the default GMainLoop inside the library. It will cause a lot of trouble for apps using GMainLoop by themselves.</div>
<div>For instance: Using my lib with QT will cause some strange events to pop-up.</div><div><br></div><div>I tried to create a separate GMainContext to keep things contained and separate from the rest of the world.</div><div>
That requires that I create a separate GMainLoop and run it in it&#39;s own thread.</div><div>However this loop won&#39;t dispatch events unless the default GMainLoop in running too (and them I face the same problem described in the last paragraph).</div>
<div><br></div><div>Long story short: Do you recommend moving on from glib-dbus to GDbus in this case?</div><div><br></div><div>Thanks very much for your answer. </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Thanks,<br>
    S<br>
_______________________________________________<br>
dbus mailing list<br>
<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=<br>Marcus Vinícius do Nascimento<br>Engenharia de Computação - EC03 - UNICAMP<br>--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=<br>