Content deleted Content added
Add information on CopyOnWriteArrayList |
→CopyOnWriteArrayList class: fixed grammar |
||
Line 130:
In some scenarios, synchronization is mandatory. For example, if a method modifies a static field, and the method must be called by multiple threads, then synchronization is mandatory and concurrency utilities such as {{code|CopyOnWriteArrayList}} should not be used.
However synchronization can incur a performance overhead. For scenarios where synchronization is not mandatory, then the {{code|CopyOnWriteArrayList}} is a viable, thread-safe alternative to synchronization that leverages [[
{{sfn|Bloch|2018|loc=Chapter §11 Item 79: Avoid excessive synchronization|pp=317-322}}
==Queue interfaces==
|