[Stackless] Stackless / Networking

Andrew Francis andrewfr_ice at yahoo.com
Tue Feb 20 23:27:36 CET 2007

Hello Greg:

--- ghazel at gmail.com wrote:

> Twisted accepts connections in an async fashion. 


>The main loop only blocks inside the select/poll

My understanding is that because Stackless and Twisted
are running in the same thread, when select/poll
blocks, everything will block. This is what I have

>If you need a tasklet to run during that time, you
>could hook up a tasklet to run concurrently with a
>coiterator (twisted.internet.task.coiterate). 
>That way specific yield points could schedule the
>reactor to select/poll for events without blocking
for >long periods of time.

I did not see coiterate in my documentation (Twisted
2.4). Looking coiterate up at 


it seems to be undocumented. That said, I used
LoopingCall to call schedule() at regular intervals.
However under certain scenarios I got flaky results
(lost deferreds, runtime errors). It was a mess.

When I have time, I will look at coiterate. I am
always on the lookout for a better way of doing
things. So far it seems to me that running Stackless
and Twisted in their own threads seems straightforward
and safe. 


Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list