[uWSGI] yield in async mode

ZHOU Xiaobo xb.zhou at qq.com
Wed Dec 21 06:18:30 CET 2011


In async mode, my code is like below:

def application(environ, start_response):
    ......
    if cmd == "search":
          search_func(...)
    elif
        ......


def search_func(......):
      ......
      uwsgi.wait_fd_read(......)
      yield
      ......
     yield


But the performance drops dramatically. I think it's because the nested 'yield'.
My question is: what is the solution of the situation which uses 'cmd' to dispatch 
the request to a function.

thx

------------------
Sincerely yours
                         ZHOU Xiaobo


More information about the uWSGI mailing list