|
-
July 15th, 2010, 11:09 PM
#1
volatile variable in multithreaded programming
Usually if a global variable is shared by more than one thread, this variable needs to be declared volatile. Basically I understand why we need to declare a variable as volatile because it may change without being detected by compiler. But what make a shared global variable change without being detected by compiler in a multithreaded environment?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|