2014-07-12 7:32 GMT-03:00 Roberto De Ioris <[email protected]>:
>
>> So I did:
>> uwsgi.wait_read_hook = uwsgi_simple_wait_read_hook;
>>
>> and it also works, however implementing the Qt loop async
>> is a must, as the programer can easily create a local loop
>> with QEvenLoop and have the socket notifier to get another
>> request which fails to process here, what should be done?
>>
>> Many thanks,
>>
>
> Some day ago you showed me an implementation of read/write hook using qt.
> I think it is the best approach to follow (using QSocketNotifier interface).
That implementation is very inefficient as it creates a new
QAbstractSocket on each
call, creating and deleting takes time for no visible gain imo.


> Feel free to make a pull request for the uwsgi-qtloop project.
I will do that once I have the engine in Cutelyst working well.


> By the way, i fear you did somethign wrong as uwsgi_simple_wait_read_hook
> is automatically initialized on startup (in the init.c source)
Well I fear that too, but I couldn't find what I might have done wrong.
(besides that I manually set my own loop engine in Cutelyst plugin, if
that is a problem anyway).

Would you mind bringing me some clarification to async mode?

When using QCoreApplication being able to deal with
requests in async mode is a must, basically what might happen is
1 New request #2
2 New request #1
3 Processing request #1
4 while processing the app creates a local loop which returns to main
loop (QCoreApp) #1

Here what should happen is:
4 Processing request #2

I could create a new wsgi_request and call wsgi_req_setup();
however it might make sense to use the --async feature,
but the core number that comes with it makes an almost
infinite loop while a the async queue is freed, so I wonder
what would you suggest.

Besides this, can I assume for every uwsgi.thread will
always be a uwsgi.sock?

Thanks


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



-- 
Daniel Nicoletti

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

Reply via email to