How do you "kill" a running thread?
How do you "kill" a running thread?
I'm aware that killing threads is bad practice and somehow problematic as they might have other threads by themselves or have filedescriptors open and what not.
Yet, ... if one has a job which is running too long (or for ever) it might be desirable to take action, whatever that is.
Maybe offering a callback function which is called when the timeout occurs? This way one needs not to build a timeout function in the function which is executed by the scheduler, ....
Well, I could add a timeout event which you could listen to. Would that work for you?