[Stackless] Stackless WSGI http server..

Richard Tew richard.m.tew at gmail.com
Sat Apr 7 17:32:08 CEST 2007

On 4/6/07, Alec Flett <alecf at flett.org> wrote:
> So I uncovered the Google Code wiki
> (http://code.google.com/p/stacklessexamples/wiki/StacklessExamples)
> - it seems like a slightly newer version of the wiki on stackless.com. Which
> should we be using?

The example wiki is a limited one, addressing only the limited
contents of the Stackless Examples project.  That is, examples,
libraries and documentation related to Stackless all located in a
respository maintainable by the Stackless community.  In this case the
community consists entirely of Carlos Eduardo de Paula.  There is much
more to Stackless than these three aspects and that is covered in the
stackless.com website and wiki.

> Anyhow, on there I discovered basicWebserver.py which supposedly fires off a
> tasklet for each connection. I mean the code there looks right, but I'm
> finding that it's still blocking on every request - meaning that if one
> request is running, no more requests can be served.

Are you sure your use of it is not doing something to block the python
interpreter or prevent the scheduler from running? I just checked in a
modified version which shows that two concurrent requests are both
being served at the same time.  If you can provide a modified minimal
reproduction case which shows that this is not the case, then I will
be happy to look at it.

> I'm also not sure I see any specific advantage to using stacklesssocket.py
> here - is that just an extra optimization to get some scheduling done in the
> socket code? Because it seems like the server (should) be managing most of
> this pretty well.

It is not meant to be the best solution for any given application, but
merely a useful way to allow people to use the socket module in a
Stackless compatible way (transparently using asynchronous operations
to allow scheduling to continue).  If you see no advantage to using it
and have some other manner in mind which lends itself more to your
application, then by all means use it.


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list