3 ms·
I highly recommend java devs use the concurrent collections and avoid using the synchronized keyword.
by itronitron 8y ago
I highly recommend java devs use the concurrent collections and avoid using the synchronized keyword.
- opportune 8y agoThis, using synchronized is a mistake unless you really need to use some exotic collection without an implementation in java.util.concurrent
- preordained 8y agoNot every set of operations you need to synchronize can be squished into a collection operation (add, get, etc.). If all you need to do is make sure things can get and add stuff to a queue or list concurrently, well yah, that's definitely a good place to be. Can also just shove it all off on your DB