at work we have some requests that do take forever to finish, so much that by that time the frontend already killed the connection and thus, no matter if the request finishes or not, the user will not see the result.
Is there any way that, given a thread that is processing a request and some logic to know if it can be cancelled, a thread can be stopped and freed?
I also posted it on Stackoverflow with some more detail: