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

请问黄老师,静态代码块在类加载的时候算原子操作么 #7

Open
mengya22 opened this issue Mar 23, 2019 · 0 comments

Comments

@mengya22
Copy link

请问黄老师,静态代码块在类加载的时候算原子操作么,如果不是原子操作,那也有可能出现线程不安全吧,那如果在静态代码块中new 了对象,且发生了重排序,是不是也有可能拿到没有初始化完全的引用呢,谢谢!

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

1 participant