You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a race condition between two threads, one trying to close a socket and the other reading from it as shown in the code below, but the thread calling recieve needs to be able to yield an error if the socket is closed.
If I call close in the other thread then it hits the .WSAENOTSOCK => unreachable, case in recvfrom. Can a method be exposed to cleanly shutdown a socket so there is no race condition?
The text was updated successfully, but these errors were encountered:
I have a race condition between two threads, one trying to close a socket and the other reading from it as shown in the code below, but the thread calling
recieve
needs to be able to yield an error if the socket is closed.If I call
close
in the other thread then it hits the.WSAENOTSOCK => unreachable,
case inrecvfrom
. Can a method be exposed to cleanly shutdown a socket so there is no race condition?The text was updated successfully, but these errors were encountered: