"thread safe - final local method variable passed on to threads?" Code Answer

5

no, this is absolutely not thread-safe. just because you've got it in a final variable, that means that both threads will see the same reference, which is fine - but it doesn't make the object any more thread-safe.

either you need to synchronize access, or use concurrentskiplistset.

By jasminejeane on January 30 2022

Answers related to “thread safe - final local method variable passed on to threads?”

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