[Stackless] Stackless / Networking

ghazel at gmail.com ghazel at gmail.com
Tue Feb 20 22:32:14 CET 2007

> The problem I encountered with running Stackless and
> Twisted in the same thread is if the Twisted reactor
> blocks waiting (i.e., for an incoming client
> connection), Stackless will block. This is okay, if
> tasklets just wait for connections. However if you
> have other tasklets that could otherwise execute, they
> will block too. This cuts down on the Application's
> overall concurrency.

Twisted accepts connections in an async fashion. The main loop only blocks
inside the select/poll mechanism. 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070220/a5fd4e9d/attachment.htm>
-------------- next part --------------
Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list