tower
tower copied to clipboard
feat(timeout): add a timeout which can also timeout on poll_ready
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 :)