From: dmoore99atwork (dmoore_at_[hidden])
Date: 2002-03-13 14:50:22


--- In boost_at_y..., "danl_miller" <danl_miller_at_b...> wrote:

> a prior work-request). Thus when more than one thread in that
> thread-pool is idle, more than one thread is pending on the same
> message-queue, which as mentioned is a case of the producer-consumer
> application of semaphore. The message-queue has as the core of its
> internal implementation a semaphore governing the size of the
> work-requests pushed into the shared(-among-producers) queue as well
> as governing the doling out of the work-requests which each idle
> thread pops from the shared(-among-consumers) queue.

It sounds like the semaphore you are proposing would block readers
who call "down" when count == 0 and would block writers who call "up"
when count == MAX?

Or do you mean a message queue with two internal semaphores, one for
readers that reaches zero when empty, and one for writers that
reaches zero when full?

Thanks,
Dave