[squid-users] Re: a general question

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 15 Apr 2001 01:05:22 +0200

Songqing Chen wrote:

> I am continuing to read the source code, and have more funs. :)
> The handler functions are used as the most common way to do the
> concrete processing when it is needed.
> But what are they called "callback" functions?

It is mostly a matter of terminology.

Handlers are registered to be called when I/O is possible.

Callbacks are sent as arguments to other functions, such as aclCheckNB,
and called when the requested operation has completed.

The principle of the two are very similar.

> In the squid 2.3.STABLE I am reading, the "clientCheckNoCache" &
> "clientCheckNoCacheDone" are not present.

The no_cache check was extended in Squid-2.4.

> What do you mean "the handlers with a . are called when ready and others are
> processed while waiting?" Do you mean the others are "non-blocking" way?

Squid uses a non-blocking I/O model, and while it is waiting for one
request to progress, handlers for other requests are still being called.
There might be a thousand or more concurrent requests being processed
"at the same time", a little piece at a time.

--
Henrik Nordstrom
Squid Hacker
Received on Sat Apr 14 2001 - 17:05:31 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:59:19 MST