From: "Ryan Bloom" <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 8:55 PM
> The problem that remains is Windows. Windows starts the server, and creates > one thread for each socket that is configured. That thread sits in accept, and > passes the accepted socket to worker threads. This seems like a waste of > resources, but I will accept that the Windows experts know what they are doing. > My problem is that it doesn't really fit the model above. I guess that Windows > could work by using the first hook above, and then looping through the > apr_pollfd_t, creating threads that call the third hook above. Uh... no, that's AcceptEx, and it has entirely different mechanics. There will always be data to process when a winsock has accept-ex-ed a socket (thus the different API.) Ergo, no thread is woken until it has a job to do. You don't have an empty 'I'm Here' cycle on Windows. Therefore the mechanics of your hook mechansim should reflect that. Having a single acceptor thread would actually incur a much larger problem in scalability, for which there is no reason to force threads to wait in the queue. Also, waitformultipleobjects only accepts some 65 events (timeout + 64 entries) so it's a rather limited server (as 1.3 was) that can only listen to 64 sockets. Bill
