forked from tokio-rs/tokio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make timeout robust against budget-depleting tasks
Up until now, if the future that we were applying a timeout to consistently depleted the coop budget, the timeout never got a chance to be evaluated. In the next call to `poll`, the underlying future would be polled and it would once again deplete the budget. In those circumstances, timeouts would not be respected. This can be surprising to people, and in fact it was in tokio-rs#4291 . The solution is to make a budget exception with `timeout` if it was the underlying future that depleted the budget. Refs: tokio-rs#4291 , tokio-rs#4300
- Loading branch information
Showing
3 changed files
with
44 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters