tower icon indicating copy to clipboard operation
tower copied to clipboard

feat(timeout): add a timeout which can also timeout on poll_ready

Open bnjjj opened this issue 2 years ago • 1 comments

Following a discussion on Discord I mentioned it was impossible to use Timeout with RateLimit because RateLimit is currently waiting in the poll_ready but the current Timeout implementation doesn't care at all about poll_ready call to inner service. The main goal of this PR is to add the ability to set a timeout for both call to poll_ready and call to be sure we can in case of a wait in poll_ready be able to interrupt/timeout the current request.

I'm not good to find good names so if you have better suggestions than just GlobalTimeout feel free :)

bnjjj avatar Jul 07 '22 09:07 bnjjj