Open QiAnXinCodeSafe opened 4 years ago
Hi, thanks for the information. Could you please let us know as a better way of doing it submitting a patch. We'll be glad to integrate any improvement. thanks
Hi, thanks for the information. Could you please let us know as a better way of doing it submitting a patch. We'll be glad to integrate any improvement. thanks Modify the variable map with volatile.
Hi @QiAnXinCodeSafe, if you can submit a Pull Request it would be better and would make your collaborations and out testing more productive. Could you send as a PR for this issue? thanks
https://github.com/apache/royale-compiler/blob/6f75df78d08d3c4a7f81a8d25d96b978972ee480/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java#L224-L232
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.