[concurrency-interest] ConcurrentLinkedBlockingQueue ?

Hanson Char hanson.char at gmail.com
Tue Sep 19 13:15:46 EDT 2006


More experiments seem to indicate that when the mix is N-producer
1-consumer, CLBQ consistently outperform the LBQ . However, when the mix is
N-producer and M-consumer, it seems the reverse is true. Not exactly sure
why. Probably CLBQ incurs a higher overhead as compared to LBQ in the
M-consumer situation.

Hanson

On 9/18/06, Hanson Char <hanson.char at gmail.com> wrote:
>
> Just in case anyone is still interested in the CLBQ, it was further
> "micro-optimized" a couple of days ago.
>
> Cheers,
> Hanson
>
>
> On 9/13/06, Hanson Char <hanson.char at gmail.com> wrote:
> >
> > Hi,
> >
> > I've enhanced ConcurrentLinkedBlockingQueue (CLBQ) such that both the
> > take() and poll(long,TimeUnit) now throws an InterruptedException if
> > interrupted while waiting.
> >
> > Source:
> >
> >
> >
> > http://svn.sourceforge.net/viewvc/beanlib/trunk/beanlib/src/net/sf/beanlib/util/concurrent/ConcurrentLinkedBlockingQueue.java
> >
> > However, since CLBQ does not implement the BlockingQueue interface, the
> > name CLBQ is pretty misleading!  Any suggestion for a better name ?  Or
> > should these extra take() and poll(long,TimeUnit) should really be
> > added/incorporated to the existing j.u.c.ConcurrentLinkedQueue ?
> >
> > Hanson
> >
> > (Previous test result before the enhancement: http://beanlib.sourceforge.net/pdf/060911/060911-clbq.pdf
> > )
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060919/8000fa9d/attachment.html 


More information about the Concurrency-interest mailing list