tea-time
tea-time copied to clipboard
How to impolitely/ forcedly stop all threads in the thread pool?
tt/stop!
waits for the threads to finish. Is there a recommended way to simply kill the thread or threads, e.g. if it just takes too long or whatever?
I have a recurring calculation that takes ~3 minutes but can be started any time again - the result can be calculated later if for some reason it does not finish. Do you have a recommendation for killing the threads e.g. when deploying a new version of the application as fast as possible?
How would you approach it if I wanted to give it e.g. a 2 second timeout and than kill the threads no matter what?