Einar Wolfgang Karlsen writes:
>
> Provide some feature that explicitly terminates the session and shuts
> down all deamon threads. Cumbersome solution, which does not quite fit
> with the paradigm that the main program is terminated whenever there
> are no more active threads around (there are pending threads, but they
> are not useful/important).
>
There's an RTS entry point for doing this already,
(_ccall_ shutdownHaskell). With it you can approximate the daemon
threads you describe (hint: create your own forkIO wrapper action.)
What happens when a daemon thread forks off new (non-demonic) threads;
do they belong to the daemon when it comes to deciding the termination
of the program? I presume the demonic property is inherited..
Re: Simon's mention of thread IDs; is the lack of thread identity
in Concurrent Haskell something that people in general miss?
--Sigbjorn