asynchronous calls in python

John (J5) Palmieri johnp at redhat.com
Mon Mar 21 11:19:52 PST 2005


On Mon, 2005-03-21 at 12:01, Haran Shivanan wrote:
> Is there any easy way to get non-blocking remote calls in Python? The
> existing bindings seem to only support send_with_reply_and_block.
> 
> I wrote my own RemoteObject\RemoteMethod classes to use send_with_reply
> and it works fine, but I don't know what to do with the PendingCall
> object that gets returned. 
> The C API seems to support set_notify functions that call a method when
> the reply gets some data but there doesn't seem to be any obvious way to
> make this work in Python.
> 
> Is this just that the bindings for Python are not complete (In which
> case, maybe I can work on a patch to add this functionality?) or is
> there some easy way to do this that I'm missing?

The bindings are just not complete.  I would love to get patches from
someone.  Basically what I would like to see is the ability to pass in 
a callback when invoking a method.  Don't know how this could best be
done.  Basically if a callback is set to anything other than None, the
call will not block.  

Keep in mind I want to do an overhaul of the bindings at some point so
if you see a better way we can structure things let me know.  Right now
I am stuck trying to get the bindings to compile with gcc 4.0 so I
haven't been hacking on functionality all that much.  If you are
offering to help that would be great.

--
J5



More information about the dbus mailing list