On Tue, Nov 13, 2001 at 11:19:54AM -0500, Cliff Woolley wrote: > On Tue, 13 Nov 2001, Brian Pane wrote: > > How about a "close-on-mmap" flag for file buckets, which > > mod_core would set when creating file buckets but mod_file_cache > > wouldn't?
Don't make it so specific. Just insert the file (or mmap or any other object!) into the bucket with a *refcount*. When you transform the file into a bucket, you decrement the refcount. If it hits zero, then you close the file. The cache inserts with refcount==1. Everybody else does count==0. > I've proposed that before. But if it wasn't vetoed it was -0.5'ed, with > the reason being that a lazy closing of file descriptors and other > resources is one of the main points of the pool cleanup system; closing > all these things can take a good deal of time, and it's better to do it > after the client has received all of the data than during mainline request > processing. That is bogus, as has been pointed out. You have to close them sometime. Doing it sooner rather than later means that you have more file descriptors available for further processing in the request. Cheers, -g -- Greg Stein, http://www.lyra.org/
