• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Volatile in JDK 1.4

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I know that you need to use volatile modifier if the variable is being used by two or more threads simultaneously. But in an example even if I am not using volatile and if i change that variable it gets notified into other thread. Does JDK 1.4 use other technoques to handle shared variables? BTW i m not using any synchronized block. not even System.out.println()...

I m using JDK 1.4.2 and Eclipse 3.0. any insight will b helpful.

thanks
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://gee.cs.oswego.edu/dl/cpj/jmm.html

You are interested in the 'Visibility' section.
 
reply
    Bookmark Topic Watch Topic
  • New Topic