Yaniv,
Generators help! On the 30 applications, I am now using one dispatcher application to run them. So I now only use one application. This works well with what we are doing. Thank you very much for your help! Lixin Yao From: [email protected] [mailto:[email protected]] On Behalf Of Yaniv Aknin Sent: Thursday, June 09, 2011 6:35 PM To: uWSGI developers and users list Subject: Re: [uWSGI] yield in a function does not work This is incorrect usage of generators <http://docs.python.org/tutorial/classes.html#generators> . Perhaps you meant: def test(): yield “this is from test” def main_handler(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) for output in test(): yield output yield “this is from main” On Fri, Jun 10, 2011 at 1:31 AM, Lixin Yao <[email protected]> wrote: Hi, With nginx and uwsgi, the yield in test function (see following code) does not work. It does not really yield anything. def test(): yield “this is from test” def main_handler(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) test() yield “this is from main” How do you solve this? Thanks. Lixin Yao _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
