[IronPython] Can't get asynchronous delegates to work
Ivan Porto Carrero
ivan at flanders.co.nz
Thu Sep 11 12:04:45 CEST 2008
I had the same problem with asynchronous operations but only when I do it in
a GUI layer like winforms or WPF.
To get around that I used ThreadPool.QueueUserWorkItem
On Thu, Sep 11, 2008 at 11:32 AM, Knic Knic <oneeyedelf1 at gmail.com> wrote:
> I am trying to get asynchronous delegates to work in 1.1.2 and 2.0 beta3,
> both fail for me, here is what I am trying to do
> from IronPython.Runtime.Calls import CallTarget0
> def printHi():
> print 'hi'
> delegate = CallTarget0(printHi)
> async_result = delegate.BeginInvoke(None, None)
> Here is what I get:
> Traceback (most recent call last):
> File , line 0, in <stdin>##22
> File , line 0, in EndInvoke##23
> SystemError: Object reference not set to an instance of an object.
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users