[network] #2: Socket related IO cannot be be interrupted on Windows
network
libraries at haskell.org
Tue Jan 20 14:30:32 EST 2009
#2: Socket related IO cannot be be interrupted on Windows
---------------------+------------------------------------------------------
Reporter: igloo | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: network | Version:
Keywords: |
---------------------+------------------------------------------------------
Originally reported here: http://hackage.haskell.org/trac/ghc/ticket/2943
----
While playing with socket communication, I noticed that socket IO cannot
be interrupted or killed. The attached program simply hangs, irregardless
whether is was complied using the -threaded flag or not.
{{{
import Network
import Control.Concurrent
main = withSocketsDo $ do
tid <- forkIO $ do
s <- listenOn (PortNumber 1234)
accept s
return ()
threadDelay 2000000
killThread tid
}}}
--
Ticket URL: <http://trac.haskell.org/network/ticket/2>
network <http://projects.haskell.org/network/>
Networking-related facilities
More information about the Libraries
mailing list