Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Double-Checked Locking #688

Open
QiAnXinCodeSafe opened this issue Jul 28, 2020 · 0 comments
Open

Double-Checked Locking #688

QiAnXinCodeSafe opened this issue Jul 28, 2020 · 0 comments

Comments

@QiAnXinCodeSafe
Copy link

https://github.com/facebook/stetho/blob/5cc93ec78908cdded19c5352a90635a33cf2fa7f/stetho/src/main/java/com/facebook/stetho/inspector/helper/IntegerFormatter.java#L19-L21

Double-Checked Locking is widely cited and used as an efficient method for implementing lazy initialization in a multithreaded environment.
Unfortunately, it will not work reliably in a platform independent way when implemented in Java, without additional synchronization.

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

No branches or pull requests

1 participant