On Wed, 2009-07-08 at 11:01 +1000, Bojan Smojver wrote:
> So, the loop would be:
> 
> - poll()
> - try assembling a full request from data read so far
>   - process if successful
>   - go back to poll() if not
> 
> Too naive?

I see that we'd most likely get stuck with the accept mutex (i.e. if
another process had it, we would not be poll()-ing already accepted fds
any more).

We could work around this by using apr_proc_mutex_trylock() if there are
any already accepted fds. If this fails, we just poll() already accepted
fds (i.e. someone is already poll()-ing to accept()). Otherwise, we
poll() the lot.

-- 
Bojan

Reply via email to