-
Notifications
You must be signed in to change notification settings - Fork 3k
TCPSocket send() in one thread blocked by recv() in another #2493
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
Comments
Nope, you should be able to read and write at the same time. |
Thanks for the test program @pythontech, with it I was easily able to reproduce your problem and have a fix for it in #2502. |
Thanks for looking into this @c1728p9! |
Many thanks for the fix. (I inadvertently posted the issue from a different account, not that it matters) |
ARM Internal Ref: IOTMORF-423 |
Now that #2502 is merged, I believe this issue is fixed. Let us know if that's not the case. |
When one thread is blocked in a recv() call on a TCPSocket, a send() call to the same socket in another thread appears to block until the recv() succeeds.
I have created a test program which demonstrates this. The synopsis is:
What I expect is that the threads operate independently: the regular send() calls complete regardless of whether any data is recv()ed in the ancillary thread.
What I see is that each send() call is blocked until data is sent from the client and recv()ed.
As an example run, I telnet to the FRDM-K64F; wait several seconds; type "hi"; wait several more seconds; type "foo".
At the telnet end, what I see is (with my input echoed):
At the FRDM end, what I see is this:
A similar pattern of operation worked as I expected with mbed 2 and the EthernetInterface library.
This issue may be related to #2426
The text was updated successfully, but these errors were encountered: