Two interfaces in the same process

Thiago Macieira thiago at kde.org
Thu Oct 25 15:32:24 PDT 2012


On quinta-feira, 25 de outubro de 2012 13.24.08, bogdanul2003 wrote:
> I use glib bindings for dbus and got into the fallowing situation: I receive
> a method call on interface X. During the execution of the callback of the
> first method call another process sends another methocall on the same
> interface X. The second method call will be served after the first call
> back returns.

Right.

> I want to avoid this by making two interfaces in the same process. One
> method call will be send to interface X and the other method call to
> interface Y. Will interface Y be blocked if a method call is handled on
> interface X ? I can't use async calls for the method call on interface X
> (major changes would be required to do so).

I think you're mistaking "interface" for "service". And in any case, multiple 
service names wouldn't affect the issue. You're actually looking for multiple 
*connections* and, probably, multithreading.

> DBus has one message queue per process? If so I think that two interfaces in
> the same process will not solve the problem.

No, it has one message queue per connection.

> If you will create more then one gloop per process will you have more then
> one message queue?

No, you need more than one connection to go along. And you probably will need 
multithreading, which is a problem for dbus-glib.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20121025/f80a5c86/attachment.pgp>


More information about the dbus mailing list