Calling a thread asynchronously with a callback

Fuzzyman fuzzyman at gmail.com
Mon Nov 27 15:55:41 EST 2006


Diez B. Roggisch wrote:
> Edwin Gomez wrote:
>
> > I'm a C# developer and I'm new to Python.  I would like to know if the
> > concept of Asynchronous call-backs exists in Python.  Basically what I
> > mean is that I dispatch a thread and when the thread completes it invokes
> > a method from the calling thread.  Sort event driven concept with threads.
>
> Counter question: does such a thing exist in C#, and if, is it bound to some
> existing event loop?
>
> I'm really curious, because having code being interrupted at any time by a
> asynchronous callback strikes me as dangerous. But then maybe I'm just a
> whimp :)
>

I've used them with Windows Forms,. The callback puts a message in the
event loop. It doesn't actually interrupt the code.

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml

> Diez




More information about the Python-list mailing list