diff options
author | John-John Tedro <udoprog@tedro.se> | 2019-10-11 21:45:44 +0200 |
---|---|---|
committer | Lucio Franco <luciofranco14@gmail.com> | 2019-10-11 15:45:44 -0400 |
commit | 29f35df7f8953b03327297c7dd4692293f4c72ff (patch) | |
tree | b8a08b145641ea26ba0db03e6b43fe6d9a08f38d /tokio-macros | |
parent | 741bef8fe1bc4d058dcb7c2f6592b1e21031dbf4 (diff) |
Remove incorrect FusedFuture impl on Delay (#1652)
`is_terminated` must return `true` until the future has been polled at least once to make sure that the associated block in select is called even after the delay has elapsed.
You use `Delay` in a `select!` by [fusing it](https://docs.rs/futures-preview/0.3.0-alpha.19/futures/future/trait.FutureExt.html#method.fuse):
```rust
let delay = tokio::timer::delay(/* ... */);
let delay = delay.fuse();
select! {
_ = delay => {
/* work here */
}
}
```
Diffstat (limited to 'tokio-macros')
0 files changed, 0 insertions, 0 deletions