Skip to content

Commit

Permalink
storage: update tokio to fix a bug in mpmc channel
Browse files Browse the repository at this point in the history
Update tokio to fix the bug:
tokio-rs/tokio#4745

Signed-off-by: Jiang Liu <[email protected]>
  • Loading branch information
jiangliu committed Jun 12, 2022
1 parent 4032fe5 commit 9555c29
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 34 deletions.
50 changes: 19 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions storage/src/cache/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,8 @@ impl<T> Channel<T> {
tokio::pin!(future);

loop {
/*
// TODO: enable this after https://github.com/tokio-rs/tokio/issues/4745 has been fixed
// Make sure that no wakeup is lost if we get `None` from `try_recv`.
future.as_mut().enable();
*/

if let Some(msg) = self.try_recv() {
return Ok(msg);
Expand Down

0 comments on commit 9555c29

Please sign in to comment.