I'm running a servant server and another background thread (via async
) in gchi. When I press Ctrl+c
on the GHCi prompt, the servant server shuts down properly, but my background thread keeps running. Only quitting the entire GHCi session seems to really terminate it.
Two questions:
- Is this behaviour only because I'm in GHCi? If I compiled a binary, ran it, and then pressed Ctrl+C on it, would the background-thread still keep running?
- How do I solve for this properly?