Java: references and concurrency

The Java Language Specification guarantees that “Writes to and reads of references are always atomic, regardless of whether they are implemented as 32-bit or 64-bit values.

This is from chapter 17, section 17.7 of The Java Language Specification for Java 1.7 SE.

It’s not very common knowledge though this element of Java language specification is there for long time (at least in specification for Java 1.5 SE – this is what I can check on Oracle’s web-page).

For further reading here is some good looking article: Atomic Access and Assignment

Advertisements

About krzysztoftomaszewski

I've got M.Sc. in software engineering. I graduated in 2005 at Institute of Computer Science, Warsaw University of Technology, Faculty of Electronics and Information Technology. I'm working on computer software design and engineering continuously since 2004.
This entry was posted in Java, multithreading. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s