The Artima Developer Community
Sponsored Link

Legacy Design Forum
Thread Safety

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

is Array indexing operation atomic ?

Posted by mahesh on August 28, 2000 at 6:04 PM

Hi,

I do know that reading and writing operations for primitive data-types (except long and double) are 'atomic' (and hence thread-safe). How about array indexing. Say I have an array of user defined objects:

MyClass mArray = new MyClass[10];
..
..
..

MyClass mObject = mArray[0];

is the above statement atomic ?

Thanks,
Mahesh H.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us