Article View: borland.public.jbuilder.java.language
Article #8600Re: volatile keyword - doesn't seem to make a change
From: Torsten Welches
Date: Sun, 11 Mar 2001 15:28
Date: Sun, 11 Mar 2001 15:28
21 lines
1491 bytes
1491 bytes
Yonatan, no, non-volatile does not mean that one thread *never* sees the non-synchronized changes to the variable. Rather volatile ensures that a change by another thread is noticed "immediately" while it is unspecified *when* (not *if*) this will happen for a non-volatile variable. This entirely depends on the JVM implementation then. The JLS (�17.3) puts it this way: "... a load or store action may be issued at any time by any thread on any variable, at the whim of the implementation." JLS (�17.7) talks about the special volatile rules. (forces a "load" before each "use") >Is there a newsgroup about threads somewhere? no, language should be fine for that. Torsten
Technical Details
Message-ID:
<3aab9aa2_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!195.14.244.144References:
<3aaa9320_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,c0d5023d960f16ab X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-11 07:36:06 PST From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Newsgroups: borland.public.jbuilder.java.language References: <3aaa9320_2@dnews> Subject: Re: volatile keyword - doesn't seem to make a change Date: Sun, 11 Mar 2001 16:28:43 +0100 Lines: 23 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 NNTP-Posting-Host: 195.14.244.144 Message-ID: <3aab9aa2_2@dnews> X-Trace: 11 Mar 2001 07:32:50 -0800, 195.14.244.144 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!195.14.244.144