I am writing a server in Haskell, and I would like to explicitly close the client descriptor after disconnecting them. When I call hClose , the thread blocks until the Client closes its side of the handle. Is there any way to close it without locking?
hClose
Thanks in advance!
Of course, just run it in another thread:
import Control.Concurrent (forkIO) forkIO (hClose handle)
As jozefg stated, you can use more convenient solutions, such as those found in async , but I see no reason in this case.
async