Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Can a thread waiting on Network.Socket.accept not be killed on Windows? #36

cetinsert opened this Issue · 1 comment

1 participant

-- thread A
t <- forkIO $ do
   _ <- accept listener -- blocks
-- thread B
killThread t

works on Linux (probably also on OS X and FreeBSD) but not on Windows (tried -threaded with +RTS -N4 -RTS etc.).

  • What is the correct way to terminate a thread in this case?
  • Is there a way to fork a thread in a special mode that would allow termination at the point it is blocked on accept?
  • Would it help if A was forked with forkOS rather than forkIO?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.