Link Details

Link 77910 thumbnail
User 111696 avatar

By bloid
via blogs.sun.com
Published: Apr 28 2008 / 16:38

Knowing atomic operation is very important when we are writing thread operation in Java. Covering atomic operation inside synchronized keyword is just a overhead which we discussed sometime back in one post. Now what all comes under atomic operation
  • 8
  • 4
  • 1308
  • 449

Comments

Add your comment
User 508 avatar

gk75330 replied ago:

0 votes Vote down Vote up Reply

This wasn't insightful.

User 277849 avatar

bloviatexjs replied ago:

0 votes Vote down Vote up Reply

It is a good topic but ends with a question and confusion. So, it has some good points.

User 272422 avatar

htowninsomniac replied ago:

0 votes Vote down Vote up Reply

Java doesn't have a notion of an "atomic operation", except for the classes in the java.util.concurrent.atomic package, and even if an operation were atomic or a block could be made atomic, that would not help a lot, since the contents of a variable might be stale ("out of sync with the rest of the program") unless that variable is always protected by the same lock across all threads or volatile is used. Cf. JSR-133, "Java Memory Model".

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (8)



Voters Against This Link (4)