This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Volatile in JDK 1.4  RSS feed

 
Kamlesh Sangani
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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
 
Catalin Merfu
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://gee.cs.oswego.edu/dl/cpj/jmm.html

You are interested in the 'Visibility' section.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!