Skip to content

Replace implementation of synchronized with Locks #17723

@bishabosha

Description

@bishabosha

As mentioned in https://github.com/lampepfl/dotty/pull/15296/files#r885743554, JDK 19 will launch with virtual threads (AKA project Loom), however, synchronised blocks will pin the OS thread, reducing throughput.

in JEP 425 Oracle suggests to use ReentrantLock instead of synchronized. However is there any reason why we couldn't globally replace synchronised blocks in the backend by locks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions