[concurrency-interest] Bulk queue operations

David Holmes dholmes@dltech.com.au
Wed, 22 Dec 2004 09:33:08 +1000


Jean,

> I would be happy to have Bulk-Queue stuff in jsr166x/JDK6 because I have
> the impression that a 'putMany' with a 'takeMany' operations could be
> more efficient than many 'put' with many 'take'.  Also, we could want to
> offer many objects atomically.

Without atomicity, these methods would simply save you from writing a loop.
I don't think there is much to be gained by internalising that loop.

You would need to propose an interface to hold these methods, and define
their semantics. The interface would have to specify atomicity for these
methods, otherwise the interface would serve no purpose.

David Holmes