Hello Roberto,

ugreen  is  not  so performant as plain async? or i'm wrong? (just the
question,  I  know  - Djago and high performance not really correlated, but
just for the know)

Tuesday, May 24, 2011, 9:56:05 AM, you wrote:


> Il giorno 24/mag/2011, alle ore 10.42, [email protected] ha scritto:

>> Hello Roberto,
>> 
>> seems  there  are no easy way to yield from the view function, as I can't 
>> yield
>> HTML     response    with    standard    django    functions    (yield
>> render_to_response('index.html')) as django doesn't wait for
>> the    generator   from  the  view function and raises error. so seems
>> then django unusalbe in async mode?

> Enable ugreen (--ugreen)

> And call uwsgi.suspend() instead of yield:

> def index(request):

>       uwsgi.wait_for_fd(x)
>       uwsgi.wait_for_fd(y)
>       uwsgi.suspend()
>       uwsgi.wait_for_fd(z)
>       uwsgi.suspend()
>       # ok send the html
>       return render_to_response(...)

> If you need to send the response in various chunks, then there is
> no way to do it without heavily modifying django :(


> --
> Roberto De Ioris
> http://unbit.it

> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi



-- 
Best regards,
 Test157                            mailto:[email protected]

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to