Skip to content

update double checked locking impl #12207

Open
@adriaanm

Description

@adriaanm
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

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions