Skip to content

send_all without mutex? #43

Answered by Theldus
iyer-arvind asked this question in Q&A
Mar 10, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @iyer-arvind,
It is a good question. I've never thought about it. You mean two or more messages from two or more threads to the same client, right?

I think you are right. If send (within send_all) cannot send the entire frame at once, there may be a race condition between multiple sends fighting over a single fd/client.

Please let me know if I understand your question correctly so I can push a fix as soon as possible ;-).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@iyer-arvind
Comment options

@Theldus
Comment options

@iyer-arvind
Comment options

Answer selected by iyer-arvind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants