For example, my server handle a request cost 5 seconds, but the client stop waiting and cancel this request in 2 seconds, the 3 seconds left would be a waste, how can server know that and stop the handling process?
And I'm using Java Spring, is it possible to do this?
And If not, is there any good way to handle this case of waste caused by client cancelling?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For example, my server handle a request cost 5 seconds, but the client stop waiting and cancel this request in 2 seconds, the 3 seconds left would be a waste, how can server know that and stop the handling process?
And I'm using Java Spring, is it possible to do this?
And If not, is there any good way to handle this case of waste caused by client cancelling?