I need to have a thread-safe LIFO structure and found that I can use thread-safe implementations of Deque
for this. Java 7 has introduced ConcurrentLinkedDeque
and Java 6 has LinkedBlockingDeque
.
If I were to use only the non-blocking methods in LinkedBlockingDeque
such as addFirst()
and removeFirst()
does it have any difference to ConcurrentLinkedDeque
?
i.e. If you disregard the blocking aspect, is there any other difference between ConcurrentLinkedDeque
and LinkedBlockingDeque
, apart from LinkedBlockingDeque
being bounded?