[concurrency-interest] On A Formal Definition of 'Data-Race'

oleksandr otenko oleksandr.otenko at oracle.com
Tue Apr 16 15:33:39 EDT 2013


Technically, setting hash value is racy. It is the same value, but the 
writes race.

Alex

On 16/04/2013 19:57, thurstonn wrote:
> Just curious, how is String#hashCode() racy?
> Strings are immutable in java; I looked at the code a bit and I didn't see
> anything that looked racy.
> The only thing I guess could be:
> private char[] value
>
>
> Although that array is never modified in the String class, so . . .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20130416/d9639ecd/attachment.html>


More information about the Concurrency-interest mailing list