finitequeue notify/notifyAll problem

Quartz <[email protected]> Thu, 31 Jul 2003 07:32:34 -0700 (PDT)
Newsgroups gmane.comp.java.seda.user
Message-ID <[email protected]>
Hi,

I'm looking at the code and see that although enqueueMany calls a notifyAll() on the blocker
monitor, the single enqueue calls notify(). That's great, and even enqueueMany could use the
notify() if the number of element is lower than the maxBatch size.

But my concern is about the dequeuers: they don't call notify(). So if a stage enqueue one item at
a time, only one thread wakes up (notify()) and when this thread completes the dequeueing (still
hasn't processed anything), other threads are not jumping behind to dequeue.

Seams obvious that if a thread does not dequeue all items, there are some left available to other
threads and they should know about it, hence the missing call to blocker.notify() inside dequeue.

Am I right?

Thanks.
Dan.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01