using volatile keyword

后端 未结 6 1561
轮回少年
轮回少年 2020-12-21 02:26

As i understand, if we declare a variable as volatile, then it will not be stored in the local cache. Whenever thread are updating the values, it is updated to the main mem

6条回答
提交回复
热议问题