[concurrency-interest] ConcurrentLinkedQueue padding
notcarl at google.com
Tue Nov 21 16:33:55 EST 2017
Hi concurrency interest,
I was looking through ConcurrentLinkedQueue and noticed that unlike several
of the other concurrent classes, the volatile Node pointers as well as the
Nodes themselves don't have any padding. This makes me wonder, could there
be false sharing when using multiple producers to add to the queue? I was
under the impression that the GC tends to group fields of a class near each
other, which would imply that there is going to likely be contention when
quickly updating (and reading) from it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest