feat(timeout): add a timeout which can also timeout on poll_ready#677
feat(timeout): add a timeout which can also timeout on poll_ready#677bnjjj wants to merge 3 commits intotower-rs:masterfrom
Conversation
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
|
I realize this is a two-year old PR, but the sake of reviewing it and providing some feedback... I can definitely understand the goal here, although this strikes me as kind of a footgun, since a lot of I think it could potentially be cleaner if this was a helper method on |
Following a discussion on Discord I mentioned it was impossible to use
TimeoutwithRateLimitbecauseRateLimitis currently waiting in thepoll_readybut the currentTimeoutimplementation doesn't care at all aboutpoll_readycall to inner service. The main goal of this PR is to add the ability to set a timeout for both call topoll_readyandcallto be sure we can in case of a wait inpoll_readybe able to interrupt/timeout the current request.I'm not good to find good names so if you have better suggestions than just
GlobalTimeoutfeel free :)