Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

volatile 关键字的可见性问题 #568

Open
gqipan opened this issue Aug 20, 2017 · 1 comment
Open

volatile 关键字的可见性问题 #568

gqipan opened this issue Aug 20, 2017 · 1 comment

Comments

@gqipan
Copy link
Contributor

gqipan commented Aug 20, 2017

请教一个问题,在while中使用了输出之后,没有使用volatile关键字的变量也是对线程可见的,这是什么原因呢

image

@DonaldY
Copy link
Contributor

DonaldY commented Aug 24, 2017

这个之前就问过了,类似问题issue里有,可以去翻翻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants