Sergey, yes I understand that, but wouldn't increasing the polling period add
to the browser response time since the worker thread only answers after the
timeout ? I cannot add minutes to the response, nor can I have X threads
polling every N milliseconds for events.
________________________________
From: Sergey Lyubka [mailto:[EMAIL PROTECTED]
Sent: terça-feira, 29 de Abril de 2008 10:40
To: Rui Jorge Coelho
Cc: [email protected]
Subject: Re: [shttpd-general] Accept callback: threads and pipes
On Mon, Apr 28, 2008 at 10:39 PM, Rui Jorge Coelho <[EMAIL PROTECTED]> wrote:
> Hi to all!
>
> Worker threads in scalable.c use a timeout in shttpd_poll to be notified
> when a new client socket is accepted. I cannot have threads polling
> every 100ms for new sockets, it delays and adds necessary syscalls.
No. Worker threads in scalable.c do not accept new connections. New connections
are accepted only by the main thread. Worker threads are serving already
accepted connections. If you are concerned about small polling interval,
increase it, say, to couple of minutes. That will save you precious CPU cycles,
so you do not need to waste them for the additional pipe functionality.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general