> Caveat: not a uWSGI contributor, and I'm responding since this problem > sounds interesting, not because I know much about it... > > My understanding is that `yield` only makes sense in this context if your > app is a generator function you've written yourself and passed to uWSGI > directly (AFAIK this is kind of an extension to the WSGI spec: it's > supposed to return an iterator, not be a generator itself...?). If you're > using a framework like Pyramid then you'll always be too far down the call > stack (aka "anywhere but the very top") for `yield` to trigger uWSGI's > async behavior. > > So the point of `uwsgi.suspend()` is to trigger that behavior if you're > further down the call stack, aka all the time if you're using a framework. > Now, why that's not working correctly, I have no idea. > >
Yes, uwsgi.suspend() is a more brutal way for when yield cannot be used. Having said that, the low-level async mode is really low-level, plugins like gevent (or coroae) are build on top of it so it is generally better to use them. -- Roberto De Ioris http://unbit.com _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
