[concurrency-interest] ThreadPoolExecutor workQueue concurrency issue

Doug Lea dl at cs.oswego.edu
Tue Dec 11 19:33:07 EST 2007

Guy Korland wrote:
> BTW, one small question can you explain the reason behind the 
> PaddeAtomicReference?

The Exchanger internal documentation has a better description
of rationale -- see

But the main idea is that when you are spreading memory contention out
from a single location, the last thing you want is to use
to another location on the same cache line as the first --
you'll get the same amount of memory contention. The padded
versions just add some filler fields to avoid this. They lead
to a very noticeable improvement on some machines, and are used
sparingly enough that they don't noticeably impact footprint.


More information about the Concurrency-interest mailing list