Skip to content

Commit 9f8fdb4

Browse files
committed
backoff: Add yield to async backoff
1 parent 7e6d730 commit 9f8fdb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shared.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ impl<F: Flavor> ChannelShared<F> {
285285
// 1 core don't backoff
286286
return None;
287287
}
288-
Some(Backoff::from(cfg))
288+
// It's effective to yield for size=1
289+
Some(Backoff::from(cfg.limit(self.backoff_limit)))
289290
}
290291
}
291292

0 commit comments

Comments
 (0)