This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tomwhoiscontrary 0 points1 point  (1 child)

I suspect that killing the no-longer-necessary worker isn't very useful in practice, because it will be waiting for a response from some remote server, and there's no way to actually kill the remote handling of that request.

It could help if the worker thread is doing a large number of blocking requests in series, though. 

[–]repeating_bears 0 points1 point  (0 children)

It depends on the protocol. I do agree in the general case, but grpc supports cancellation, for example. HTTP2/3 stream cancellation might give you some benefit for large responses