[concurrency-interest] ConcurrentLinkedQueue implementation
Brian S O'Neill
bronee at gmail.com
Mon Apr 27 11:56:14 EDT 2009
Please re-read Martin's response. Note the use of the word "Deque"
instead of "Queue". Also, if you're looking for a ConcurrentLinkedDeque
implementation, none is provided in the JDK.
Vishal Byakod wrote:
> I need an API to insert an object at the beginning of a list and also
> one which can remove the first element from a list( just as LinkedList
> removeFirst() & LinkedList addFirst(). LinkedBlockingQueue has API's
> to insert at the end and retreive from the head. The collection also
> has to be highly performant under concurrent access.
> Can you think of anything else?
> On Mon, Apr 27, 2009 at 8:13 PM, Martin Buchholz <martinrb at google.com> wrote:
>> LinkedList is a Deque, but ConcurrentLinkedQueue intentionally is not.
>> You could try LinkedBlockingDeque instead.
>> On Mon, Apr 27, 2009 at 06:58, Vishal Byakod <vishal.byakod at gmail.com> wrote:
>>> I want to replace java.util.LinkedList with the ConcurrentLinkedQueue
>>> implementation, but am not sure what to use for LinkedList.addFirst()
>>> and LinkedList removeFirst(). ConcurrentLinkedQueue does’nt seem to
>>> have equivalent API’s.
>>> Can anyone suggest what other options I have.
>>> Concurrency-interest mailing list
>>> Concurrency-interest at cs.oswego.edu
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
More information about the Concurrency-interest