[Haskell-beginners] Testing unpure network code

Isaac Dupree ml at isaac.cedarswampstudios.org
Thu Jun 11 09:59:09 EDT 2009


Maciej Piechotka wrote:
> Hello. I have a problem with testing. I've wrote a client library for
> NNTP protocol. However I don't know how to test it.
> 
> I though about spawning a thread for server inside a test but Haskell
> (ghc and hugs?) uses green blocking threads so forkIO is not an option.

GHC forkIO uses threads that can make blocking foreign calls in parallel 
(*not* blocking the whole process), at least if you compile with
ghc -threaded

-Isaac


More information about the Beginners mailing list