[Stackless] stackless & web.py

Richard Tew richard.m.tew at gmail.com
Thu Feb 28 01:45:00 CET 2013


On Wed, Feb 27, 2013 at 3:18 AM, lars van Gemerden <lars at rational-it.com> wrote:
> I am in the process of finding a way connect my application to a webserver.
> I am considering web.py but read somewhere that stackless and web.py might
> not be compatible. Is that true?

Here's some questions for you:

1) What link says that Stackless and web.py are not compatible?
2) Do you know that code that blocks the current thread and does not
yield to the scheduler is not Stackless compatible?
3) Given 2) is it reasonable to accept that this means that any
networking framework that you just run, like web.py cannot be as they
stand be Stackless compatible?

> If so what might be the most straightforward approach to be able to hook my
> application up to a webserver? The user must be able to edit and submit data
> sent to the browser.

There are several options:
1) Write a Stackless compatible web server.
2) Adapt an existing web server to be Stackless compatible.
3) Monkey-patch using 'stacklesslib', which makes the blocking calls
built into the Python interpreter and standard library Stackless
compatible.

Feel free to follow up with further questions, or request
clarification if I the above is not clear :-)

Cheers,
Richard.



More information about the Stackless mailing list