Skip to content

Question: Thread safe #424

@jinwik

Description

@jinwik

Hi, I am currently using the jasync client in Vert.x. Is there a potential thread-safety issue with MySQLFrameDecoder? When we call sendQuery, it is executed on vert.x-eventloop-thread-0, where queryProcessStarted is invoked, setting this.isInQuery = true. However, during decoding, it might switch to a different thread, such as vert.x-eventloop-thread-1. Could this cause this.isInQuery to become invisible? Should we add the volatile keyword to the relevant variable? Thanks
image
image

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