Aaron Bannert wrote:
> 
> On Thu, Jan 17, 2002 at 11:08:37PM -0500, Greg Ames wrote:
> > No, you have to look at how sendfile_it_all interacts with apr_sendfile and the
> > kernel.  It blocks in select() until the kernel is happy with the amount of room
> > in its socket buffers. 

> Yes, I see that now. If I get a chance I'll try to add the
> APR_INCOMPLETE_foo state you were talking about. Is there a reason we
> don't just call sendfile in blocking mode?

unfortunately, yes.  We want to be able to time out if the sendfile isn't making
progress.  I believe that a blocking sendfile would hang the process forever if
the client just disappears.  

It would be great if there were a way around this, at least on FreeBSD.  Some
kind of blocking sendfile with a built-in way to timeout if no progress is being
made that doesn't involve many unproductive context switches a second.  It would
be even better if select with a timeout could avoid all those nearly useless
dispatches, because select is more general purpose.

Greg

Reply via email to