0

when I read source code of ConcurrentHashMap in Java8, it uses volatile reference to achieve concurrent, so the volatile reference can keep the memory which the reference point to visible to other thread?

DESCIPLINE
  • 31
  • 3

1 Answers1

0

There are much articles in the Internet about volatile keyword and Java concurrency, for example this pretty clean explanation.

Alexey Prudnikov
  • 1,083
  • 12
  • 11
  • Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Enzokie Aug 16 '18 at 10:58