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

are the client request functions thread safe? #3

Open
era127 opened this issue Jun 10, 2024 · 1 comment
Open

are the client request functions thread safe? #3

era127 opened this issue Jun 10, 2024 · 1 comment

Comments

@era127
Copy link

era127 commented Jun 10, 2024

Hi,

Are the client request functions thread safe, such that tasks across different threads could send separate requests. I see the request are written to the io.

Thanks.

@oliviermilla
Copy link
Owner

Hello @era127,

It's a good point. I don't think it is from the looks of it:

function write_one(socket, buf)

but I'm no super pro when it comes to multi-threading.

Since everything goes through this send_msg, I believe it shouldn't be too hard to reentrant lock it. Any suggestion?

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