Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Question: Thread safe #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jinwik opened this issue Aug 13, 2024 · 1 comment
Open

Question: Thread safe #424

jinwik opened this issue Aug 13, 2024 · 1 comment

Comments

@jinwik
Copy link

jinwik commented Aug 13, 2024

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

Copy link

Thank you for reporting an issue. See the wiki for documentation and gitter for questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant