Help: Tricky scenario (Concurrency issues)
Marcus Vinícius do Nascimento
marcus.nascimento at eitv.com.br
Wed Mar 2 07:04:11 PST 2011
I have the following scenario:
Process 1: Dbus server of the DBus service A. Client of the DBus service B.
Process 2: Dbus client of the DBus service A. Server of the DBus service B.
1- Process 1 goes up.
2- Process 2 goes up.
3- Process 1 calls a method in the process 2 (service A).
4- Process 2 calls a "callback" method in the process 1 (DBus service B),
notifying something happened.
I've been trying to do that using Glib DBus on both processes.
I cant wait until the work is done synchonously because it takes too long to
be done and the DBus times out.
So I'm using threads (producer, consumer), with a request queue, to process
calls in the process 2.
This way, the dbus calls only pushes a command into the queue and returns.
I'm having problems in the step number 4. The callback DBus method can not
be called until the step 3 Dbus call is finished.
It seems DBus can only make one call at a time and I can't guarantee the
first one is complete before waking up the consumer thread.
I'm wondering if the problem is related to the fact of both services use the
However, I couldn't find information regarding creating another bus of
something like this.
If I use DBus messages or signals, would I solve this concurrency problem? I
mean: Can I send a Message or Signal while a method call is in progress?
Thanks very much for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dbus