The "yield" keyword has always been a little confusing to me (and many
others). I know how it works inside a generator function, but I'm a little
unsure when it comes to the uwsgi async functionality. Is there a
difference between using yield and uwsgi.suspend()?
In the uwsgi docs I found:
uwsgi.wait_fd_read(fd0)
uwsgi.wait_fd_read(fd1)
uwsgi.wait_fd_read(fd2)
yield "" # yield the app, let uWSGI do its magic
If I'm in the middle of a generator, though, what exactly does the `yield`
do? Does it yield a value to the caller or does it pass control back to
the event engine or both?
I'm wondering if I should be calling uwsgi.suspend() in this case, but I'm
not sure if that does the same sort of thing or not.
I'm using async=100 with ugreen=true in my configuration.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi