Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - use of volatile only makes sense in multiprocessor systems?

Use of volatile only makes sense in multiprocessor systems. is this wrong?

i'm trying to learn about thread programming, so if you know any good articles/pdfs ... i like stuff that mentions a bit about how the operating system works as well not just the language's syntax.

like image 865
fabio Avatar asked Jan 05 '11 17:01

fabio


1 Answers

No. Volatile can be used in multi-threaded applications. These may or may not run on more than one processor.

like image 73
Jim Avatar answered Sep 30 '22 05:09

Jim