Skip to content
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

[Limitaion] sendRequest function passed to the client is NOT thread-safe – it cannot be called concurrently #37

Closed
epoberezkin opened this issue Apr 13, 2022 · 4 comments

Comments

@epoberezkin
Copy link

That is, can it be used concurrently from multiple threads?

Or should there be something that queues calls to it, like reads/writes to TCP handle?

I've actually already implemented a queueing mechanism, and now just feeling a bit stupid as from looking at source code it does look thread safe, and queueing requests just makes performance worse...

@epoberezkin
Copy link
Author

@kazu-yamamoto this is a real issue - this function is not thread safe and cannot be used concurrently.

I currently use queueing that makes sure there are no concurrent calls to this function, but probably it should be thread safe given how API is designed.

@epoberezkin epoberezkin changed the title [Question] Is sendRequest function passed to the client thread-safe? [Limitaion] sendRequest function passed to the client is NOT thread-safe – it cannot be called concurrently Feb 21, 2023
@kazu-yamamoto
Copy link
Owner

I guess this was fixed in a76cdf3.
If you can use sendRequest concurrently with master, please close this issue.

@epoberezkin
Copy link
Author

will test that!

@kazu-yamamoto
Copy link
Owner

Closing.
Please reopen if necessary.

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

2 participants