Volatile Keyword
Basically when two threads accessing same resource or same instance variable
then it must be read from common shared memory which is main memory for synchronise result.
so make it as volatile
For More Details click Here
Basically when two threads accessing same resource or same instance variable
then it must be read from common shared memory which is main memory for synchronise result.
so make it as volatile
For More Details click Here
No comments:
Post a Comment