• Post Reply Bookmark Topic Watch Topic
  • New Topic

AtomicReference Vs Synchronized / Concurrent lock  RSS feed

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When to use AtomicReference ? My understanding, we can get the same result in synchronized / concurrent locks.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are different ways of working with inter-thread data safety. Using synchronized keywords, locks, and Atomics are some of the various approaches available in Java. See this tutorial for explaining Atomics and how they work and what they are used for.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!