[Twisted-Python] Re: [Stackless] Stackless and Twisted

Christopher Armstrong radix at twistedmatrix.com
Wed Mar 3 22:06:16 EST 2004

Ok, here's a completely rewritten stackless support module for Twisted. 
I used to have one that did all kinds of stupid unnecessary stuff with 
the reactor and junk, but it's gone now. For you CVS Twisted users, this 
is in sandbox/radix/threadless.py.

It offers two functions: blockOn and deferredTasklet.

deferredTasklet is a function decorator that you should use on your 
stacklessy code that you want to integrate with Twisted.

blockOn is a function that you should pass a Deferred to wait for it to 
fire. Use it in your stacklessy-code.

There's a TEST function (that's automatically run when you execute the 
module) that shows this off with some somewhat helpful comments. There 
are also prints sprinkled throughout the code to show you what's going on.

  Twisted | Christopher Armstrong: International Man of Twistery
   Radix  |          Release Manager,  Twisted Project
---------+           http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: threadless.py
Type: text/x-python
Size: 1974 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20040303/7d66388b/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20040303/7d66388b/attachment.pgp 

More information about the Twisted-Python mailing list