Locking

Thiago Macieira thiago.macieira at trolltech.com
Mon Mar 20 10:16:19 PST 2006


Ross Burton wrote:
>Hi,
>
>I noticed the discussion on dispatch locking has fizzled out, and was
>wondering if:
>
>1) this would solve the deadlock where client calls server, and before
>server returns it makes a call back to client.  Currently this times
>out.

It would solve half of the problem. Currently, IIRC, the server may 
deadlock internally, which means the client times out.

The solution would allow the server not to deadlock internally. But 
whether the two programs together deadlock or not is a matter of 
implementation detail: whether the binding does a blocking wait with 
dbus_send_message_with_reply_and_block or whether it uses an event loop.

If you've got both sides waiting on 
dbus_send_message_with_reply_and_block, they'll deadlock.

The only solution to this, that I can see, is to add a DCOP-style tag to 
the message, indicating that it is being processed in the context of a 
method call.

>2) can I help test any patches?  If the patches would fix this problem
>I'd really like to see it committed soon, as it means I don't have to
>wrap large amounts of code in g_idle_add().

Our first attempt at patching backfired. There are no new patches to be 
tested yet.

-- 
Thiago José Macieira - thiago.macieira AT trolltech.com
Trolltech AS - Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060320/a1287e4d/attachment.pgp


More information about the dbus mailing list