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.