This is a patch to worker.c to prevent more connections from being accepted than there
are
workers to handle them. The accept thread decrements the avail count and the workers
increment the avail count.
I don't have a linux box handy so i cannot confirm this patch compiles. Sorry.
Bill
==
On Fri, 26 Apr 2002, Bill Stoddard wrote:
> + * later
> + */
> +if (!worker_thread_cnt) {
> +yield();
> +continue;
> +}
> +
It compiles, but it doesn't link. No such thing as yield():
server/mpm/worker/.libs/libworker.al(worker.lo): In fu
On Fri, 26 Apr 2002, Bill Stoddard wrote:
> This is a patch to worker.c to prevent more connections from being
> accepted than there are workers to handle them. The accept thread
> decrements the avail count and the workers increment the avail count. I
> don't have a linux box handy so i cannot
On Fri, Apr 26, 2002 at 02:07:29PM -0400, Bill Stoddard wrote:
> This is a patch to worker.c to prevent more connections from being accepted than
>there are
> workers to handle them. The accept thread decrements the avail count and the workers
> increment the avail count.
How about using APR co
On Fri, Apr 26, 2002 at 02:16:51PM -0400, Cliff Woolley wrote:
> On Fri, 26 Apr 2002, Bill Stoddard wrote:
>
> > This is a patch to worker.c to prevent more connections from being
> > accepted than there are workers to handle them. The accept thread
> > decrements the avail count and the workers
On Fri, 26 Apr 2002, Justin Erenkrantz wrote:
> > Besides, isn't there a race condition here? Or are you assuming ++ and --
> > are atomic?
>
> IIRC, there's no guarantee for that. -- justin
Right. That's why I'm confused. :)
--
On Fri, Apr 26, 2002 at 11:18:58AM -0700, Justin Erenkrantz wrote:
> How about using APR condition variables instead of yield()? That was
> how I was imagining implementing this. The listener would block
> until the queue is not full and then drop into the accept mutex
> rotation. I seem to rem
On Fri, 26 Apr 2002, Aaron Bannert wrote:
> LIFO->FIFO change this morning and added a counter to keep track of the
> number of elements in the queue. That can be used in a new function
> that blocks until the queue is non-full.
You mean non-empty, I presume.
--Cliff
On Fri, Apr 26, 2002 at 02:53:59PM -0400, Cliff Woolley wrote:
> On Fri, 26 Apr 2002, Aaron Bannert wrote:
>
> > LIFO->FIFO change this morning and added a counter to keep track of the
> > number of elements in the queue. That can be used in a new function
> > that blocks until the queue is non-f
> On Fri, 26 Apr 2002, Bill Stoddard wrote:
>
> > This is a patch to worker.c to prevent more connections from being
> > accepted than there are workers to handle them. The accept thread
> > decrements the avail count and the workers increment the avail count. I
> > don't have a linux box handy
Bill Stoddard wrote:
>>On Fri, 26 Apr 2002, Bill Stoddard wrote:
>>
>>>This is a patch to worker.c to prevent more connections from being
>>>accepted than there are workers to handle them. The accept thread
>>>decrements the avail count and the workers increment the avail count. I
>>>don't have
11 matches
Mail list logo