[discussion moved from squid-users to squid-dev]
There are some rudimentary information on this in the programmers guide,
and I'd recommend that you read it.
The rule for handlers in Squid is that they should never take long time
to complete. Each do a little work, and then shedule additional handlers
for future processing when there arrives more data or some time has
passed.
Almost all processing is centered around a select/poll() loop which
tells what filedescriptors there has arrived data on or is ready to
receive more data. It then calls registered handlers for these
filedescriptors taking care of whatever needs to be done on that
filedescriptor. Most of these handlers reshedule themselves to be called
next time the same operation can be performed on that filedescriptor.
-- Henrik Nordstrom Spare time Squid hacker Avi Saxena wrote: > > Thanks for the response. I have recently started looking in the squid code. > > In main.c, we have a comm_poll that polls for icp and http requests > comm_poll_icp_incoming and comm_poll_http_incoming. It is doing this in a > loop and sequentially. We check for the requests on the fd's and if there is > one, we call the handler for that (sequentially). We do not call 2 handlers > at one time, i.e. * if one handler takes a long time other requests are > blocked for that time. * Is this correct? or am I missing soething. I am > using Linux. When should "HAVE_POLL" be undefined? What are the pros and > cons? > > Thanks,Received on Tue Sep 28 1999 - 14:28:54 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:17 MST