Skip to content

ZkConnection not really thread-safe #82

@facboy

Description

@facboy

ZkConnection does not really look thread-safe to me. It locks _zk for the connect and close methods, but _zk itself is not volatile so there are no visibility guarantees when it is accessed by all the other methods.

as an aside, ReentrantLock could easily be replaced by a synchronized block/method in connect and close.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions