Some problems writing a threaded program

Simon Marlow simonmarhaskell at gmail.com
Wed Feb 13 06:39:29 EST 2008


John Vogel wrote:
>     Thankyou both Don Stewart and Simon Marlow for your responses.
> 
> 
> 
> By adding yield and threadDelay in certain spots I have at least prevented
> some of the threads from being starved of CPU time.
> 
> The only issue now is that terminateProcess doesn't always terminate
> netstat.exe in the cmd.exe so I don't get an exit condition.

Windows doesn't have the same concept of process groups that Unix has, so 
killing a shell doesn't necessarily kill its children.  Have a look at the 
hoops Ian had to jump through to get this working for our timeout program 
in the GHC testsuite:

http://darcs.haskell.org/testsuite/timeout/

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list