There exists many queue implementations in Java like LinkedList, BlockingQueues. Are all of them thread-safe? If your answer no, which implementations support concurrent access and which gives the best performance?
Note: I’m using JDK 1.6.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Most standard collections are not thread safe. You find this information when reading the API documention.
For example the documentation of LinkedList:
For collections that are accessed from multiple threads you should look at the java.util.concurrent package