Guava’s immutablelist Is the builder thread safe?
•
Java
Guava’s ImmutableList. What is the thread security of builder? Javadoc doesn't say
Solution
Although guava invariant courses are thread safe, their builders are not For most applications, only one thread will interact with any particular instance of builder
Although there is no thread safety and usually no record is required, Javadoc may make sense for immutable collection builder People may be surprised that immutablelist is thread safe, while immutablelist Builder is not@ H_ 502_ 7@
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码