Wierd interaction between calls to the bus and subsiqent
Pending Calls
Havoc Pennington
hp at redhat.com
Fri Dec 16 13:35:34 PST 2005
On Fri, 2005-12-16 at 16:15 -0500, John (J5) Palmieri wrote:
> > If you mean that a blocking call after a pending call makes the pending delays
> > the pending result for a very long time, then I have seen this as well.
> >
> > If the pending result is received while the blocking call is waiting for its
> > result, the pending result is correctly received but not dispatched.
> > A call to dispatch after the blocking call (or a blocking call sequence) is
> > finished, immediately processes the earlier received pending results.
>
> Nope this is not the issue. If you call a blocking call after you do a
> pending call then your app is broken. This is calling a pending call
> after a blocking call to the bus is made.
I'm not sure I understand this fully from the descriptions you guys are
giving, but I don't think the app is broken. The pending call should not
get its notification callback until the blocking call is done (because
no reentrancy back into the same thread is allowed while in a blocking
call). So it's a bug if the pending call is notified while blocking.
However, it's also a bug if the pending call isn't immediately notified
after the blocking completes.
Blocking in dbus _does_ block the thread that's blocking entirely.
Otherwise you can't possibly write correct code.
Havoc
More information about the dbus
mailing list