On May 22, 2008, at 4:51 AM, Manlio Perillo wrote:
I'm reading the PEP 342, and I still think that this will not work
as I want for Nginx (where I have no control over the "scheduler").
In fact the PEP 342 says:
"""However, if it were possible to pass values or exceptions *into* a
generator at the point where it was suspended, a simple co-routine
scheduler or "trampoline function" would let coroutines "call" each
other without blocking."""
However writing a co-routine scheduler or "trampoline function" when
your application is embedded in an external server is not possible
(but please, correct me if I'm wrong).
That's correct. My with_callstack wrapper supports calling
subroutines (which can yield values to the server or return results to
their caller) within a single application instance. It doesn't
support switching between app instances, since that's the server's
job. Therefore, it doesn't help with your DB connection pool example.
Chris
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com