java - Is LinkedBlockingQueue a correct choice for a producer-consumer like scenario? -


I have a consumer-consumer status that produces objects in class A type e. I have to put it in a static data structure in class A because the consumer logic should be handled in class B, in which there is no reference to the object of A. Linked the right data type to linkboxing? Or is there a better selection for this?

If you are using the bound queue, you can consider one.

In addition, LinkedBlockingQueue from Javadoc:

Linked queues generally have higher throughputs compared to array-based queues, but Most concurrent applications have less predictive performance.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -