"java arraylist.add() method thread safe for purely parallel adding? " Code Answer

2

no, it's not thread-safe. wrap your list using collections.synchronizedlist(), or use explicit synchronization when accessing the list.

By ldkronos on July 4 2022

Answers related to “java arraylist.add() method thread safe for purely parallel adding? ”

Only authorized users can answer the Search term. Please sign in first, or register a free account.