0

I just came across a BNF Grammar for JAVA. In it, "modifier" has a terminal symbol called "threadsafe". However, I have never seen it before and have not been able to locate that modifier in The Java Language Specification, Java SE 7 Edition (docs.oracle.com/javase/specs/jls/se7/jls7.pdf). Yet, I found it here, describing it in bullet 16 as:

If another thread excuting this code at the same time can not change the value of a variable then the variable is threadsafe and the compiler may do clever things with it to make the code faster or smaller.

Is this a real modifier? Is it supposed to be introduced in upcomming versions of JAVA?

KoenigGunther
  • 130
  • 1
  • 8

3 Answers3

2

Try to find it here, at the official source of Java BNF.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436
0

No it's not, nor is private_protected in the same list.

brian d foy
  • 129,424
  • 31
  • 207
  • 592
assylias
  • 321,522
  • 82
  • 660
  • 783
0

Both Java and Groovy have keywords like "threadsafe" and "goto" as "reserved tokens" in the compiler, but they have no meaning right now in the language.

Angel O'Sphere
  • 2,642
  • 20
  • 18
  • 1
    Any references for this? goto I know as it is mentioned in the docs http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html but never heard of threadsafe – Aseem Bansal Oct 17 '15 at 16:15