httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@apache.org>
Subject Re: call to 'apr_poll' in Unix MPMs
Date Mon, 22 Apr 2002 15:34:38 GMT
Michal Szymaniak wrote:
> 
> On Wed, 17 Apr 2002, Greg Ames wrote:
> 
> > Why do you think it's risky?  Worker _might_ be able to service multiple
> > sockets after a single poll, but it would break prefork for sure.
> 
> Hmm.. imagine we have Apache with two listening sockets, one #80, very busy
> with handling usual stuff, and #1080, hadling any weird protocol supported
> by one of installed modules. Now imagine that a single call to poll reports
> both of them ready to accept a connection. Apache takes #80 and services
> it. The second socket (#1080) remains untouched (according to the 'worker'
> code). Then there come more requests on #80, but #1080 still waits for
> servicing. 

not a problem. 

> Will subsequent poll calls ever notice #1080 again?  I mean,
> before any other connection to #1080 appears? 

yes.  

> Isn't it that poll notices each event (like a need for accept) only once per socket?


no.  poll is read only with respect to the fd.  In other words, it looks at the
readiness of the file descriptor without changing its state at all.  

> And that _all_ reported events have to be handled before the next poll? 

no.

Greg

Mime
View raw message