[IronPython] Making asynchronous calls in IronPython
glenn.schmottlach at harman.com
Mon May 4 22:15:08 CEST 2009
Although I'm very comfortable with CPython, I'm new to IronPython and
the .NET framework. What I am looking for is sample code that shows how
to issue an asynchronous call from IronPython using the
BeginInvoke/EndInvoke mechanism of .NET.
Currently, I'm playing around with GTK# and a D-Bus .NET implementation
(NDesk-DBus) that only provides synchronous proxy methods for D-Bus
services. I believe (please correct me if I'm wrong) that I should be
able to use the BeginInvoke/EndInvoke mechanism to issue these blocking
proxy requests asynchronously and be notified (via a callback) when the
method has completed.
My blocking proxy calls look something like this:
ret = self._proxy.TunerGetCurrentWaveBand(0)
where 'ret' returns the current waveband (AM, FM, etc..) and are called
from a button "clicked" delegate. I would rather not block the GTK#
dispatch loop while waiting for the reply from the service. Can someone
offer me any advice or provide a reference to sample code that
illustrates the basic concept from IronPython?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users