Skip to content

(unnecessary?) sync locking when checking if Native is loaded causes unneeded slowdown #80

@noamBarkai

Description

@noamBarkai

When using this library in a highly concurrent setting - vis. Apache Spark - I'm seeing a lot of contention around this synchronisation block, specifically when called from here
It seems the synchronisation is somewhat redundant and that it can safely be removed, assuming the boolean member loaded is modified to volatile, no?
I can offer a PR if you feel like wise.

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