httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: is apr_thread_cond_signal expensive ?
Date Sun, 11 Aug 2002 04:26:40 GMT
Ian Holsman wrote:

> I'm just looking through the fdqueue code again, and I noticed that we 
> are signaling the !empty condition
> on every push, regardless if we were empty or not, is there a good 
> reason to do this, instead of checking if
> we are empty and then doing the signal? 

It should be safe to skip the signal if the queue wasn't
previously empty.  I don't expect that it will help a lot,
though: the queue_info synchronization guarantees that
there's an idle worker available before the listener can
push a new connection onto the queue, so it ought to be
rare for the queue to be non-empty at the start of


View raw message