I was wondering if there is a clean solution yet for ctrl-C (i.e. SIGINT) handling? I’d like something simple that just causes all the threads to panic, dropping everything that need be dropped. Any idea how to achieve this?
You can’t. You can exit but you can’t force all threads to cleanly panic; they have to do this themselves. Alternatively, you could have your long-running threads periodically check some atomic panic flag but you’d have to do this in every thread.