Reputation: 588
In Haskell, can the same socket be shared between two threads? Essentially, what I am trying to do is create a thread to write to a socket and another to read from the socket.
The read thread would be a loop that constantly wait, monitor and pick up any messages generated by the socket.
Another thread (the write thread) would send code to the socket.
Please advise.
Upvotes: 1
Views: 142