On 12/28/17, Warren Young <[email protected]> wrote: >> >> Even the Windows server starts a new process to handle each request. >> It just does so using system() rather than fork(). > > That leaves me wondering what the threads are used for then, if not to > implement a thread-per-connection model.
There is one thread per connection in the parent process, which allows the parent to manage multiple simultaneous incoming connections. As each thread gets a complete HTTP request, it writes that request into a temporary file, uses fossil_system() to invoke the "fossil http" command to handle the request and store the reply into a second temporary file, then the thread reads the reply and sends it back over the wire. Finally, the two temporary files are deleted. The fork() approach is much nicer, but we don't have fork() on windows. I'm open to suggests on better ways to do this. -- D. Richard Hipp [email protected] _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

