Pending Calls and Asynchronous functions

jaikumar Ganesh jaikumarg at gmail.com
Wed Mar 24 09:51:22 PDT 2010


Hello folks,

On Tue, Mar 23, 2010 at 3:52 PM, jaikumar Ganesh <jaikumarg at gmail.com>wrote:

> Hello folks,
>     I have the following calls:
>
>                reply = dbus_connection_send_with_reply(conn, msg, &call,
>
>    timeout_ms);
>                if (reply == TRUE) {
>                              dbus_pending_call_set_notify(call,
>
> callback,
>
> pending,
>
> NULL);
>                }
>
> So I get a reply from the other end (very quickly) and before a pending
> function can get set in dbus_pending_call_set_notify.
> And thus when _dbus_pending_call_complete is called I don't get the
> callback because pending->function is NULL.
>
> This is a race condition and I hit it 50 % of the times depending on how
> loaded the system is.
>
> Is there a better way to set the pending call ? Am I using it wrongly ?
>
> Thanks
> Jaikumar
>

   I see a similar thread way back
http://marc.info/?l=freedesktop-dbus&m=117323278532868&w=2
   Did we dix this ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100324/19656da1/attachment.html>


More information about the dbus mailing list