> I suggest we should support control socket even if we only have 1 thread
> (when worker threads is 0), in this case listener is also worker
> (listener is listening on http port and pipe).
>
This is how it is now. Control socket is always created, but if there is
only 1 thread,
new accepted socket is not passed over the control socket, but processed
inline.
There is no point of wasting context switch just to get to the same
function.
>
> Most people are happy having just 1 thread and some platform will not
> have thread support.
>
Exactly. Using many threads not always feasible even on mutli CPU machine.
Consider situation when lots of CGI are spawned: CPUs will be busy anyways
handling CGI processes, so having one thread is a good choice.
For static content on multi-CPU machine, or in embedded case, it is a good
thing to use multiple threads.
>
> Do you think we can use shttpd_wakeup() to implement a commet-style chat
> <http://en.wikipedia.org/wiki/Comet_(programming)<http://en.wikipedia.org/wiki/Comet_%28programming%29>>
> for example ? In
> other words, send events async when the server wants.
>
Why not? Seems perfectly possible. Did not know about comet, by the way :-)
> Best regards,
> Rui
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general