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

Java 多线程三大核心 发现的问题 #65

Closed
gaosai01 opened this issue Jul 19, 2018 · 2 comments · Fixed by #68
Closed

Java 多线程三大核心 发现的问题 #65

gaosai01 opened this issue Jul 19, 2018 · 2 comments · Fixed by #68

Comments

@gaosai01
Copy link

gaosai01 commented Jul 19, 2018

位置:https://github.com/crossoverJie/Java-Interview/blob/master/MD/Threadcore.md#双重检查锁的单例模式

双重检查锁的单例模式这部分

文中写到:有可能第二步在第三步之前被执行就有可能某个线程拿到的单例对象是还没有初始化的,以致于报错。

应该是第三步在第二步之前执行,导致其他线程拿到单利对象还没有初始化

@gaosai01 gaosai01 changed the title Java 多线程三大核心 文本中的错误 Java 多线程三大核心 发现的问题 Jul 19, 2018
crossoverJie added a commit that referenced this issue Jul 19, 2018
@crossoverJie crossoverJie mentioned this issue Jul 19, 2018
6 tasks
@crossoverJie
Copy link
Owner

@Mr-GaoSai 多谢提醒,已经修复。

#68

crossoverJie added a commit that referenced this issue Jul 19, 2018
@crossoverJie
Copy link
Owner

crossoverJie commented Jul 21, 2019 via email

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

Successfully merging a pull request may close this issue.

2 participants