[Haskell-cafe] Re: Cleaning up threads

Mitar mmitar at gmail.com
Tue Sep 14 16:44:26 EDT 2010


On Tue, Sep 14, 2010 at 9:04 PM, Gregory Collins
<greg at gregorycollins.net> wrote:
> That's surprising to me -- this is how we kill the Snap webserver
> (killThread the controlling thread...).

Yes. This does work. The only problem is that my main thread then
kills child threads, which then start killing main thread again, which
then again kills child threads and interrupt cleanup.

Probably it can be solved with mask:


My question is if there is some good code example how to achieve that
before mask is available. The code I wrote in my original post does
not work as intended.


More information about the Haskell-Cafe mailing list