Open
Description
def mkSynchronizedCheck(clazz: Symbol, cond: Tree, syncBody: List[Tree], stats: List[Tree]): Tree
is based on http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html,
but now we're on java 8 we should revisit and consult https://shipilev.net/blog/2014/safe-public-construction to make sure we're using the best variant
Should do this for both lazy vals/modules of classes and local ones.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
dwijnand commentedon Oct 22, 2020
Looking at scala/scala@d9974be it looks almost like part of the impl was changed to follow shipilev's guidance while the other was left as a TODO?