[Stackless] Stackless and Twisted

Christopher Armstrong radix at twistedmatrix.com
Thu Mar 4 04:06:16 CET 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://www.stackless.com/pipermail/stackless/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://www.stackless.com/pipermail/stackless/attachments/20040303/7d66388b/attachment.pgp>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless


More information about the Stackless mailing list