From 372a4321799136e6fd86d6f9504514e8edf0eaea Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 16 Feb 2021 06:14:16 +1000 Subject: [PATCH] Update the call_all comment in Inbound (#1737) --- zebrad/src/components/inbound.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zebrad/src/components/inbound.rs b/zebrad/src/components/inbound.rs index 2e66a1c9..e2f0ed39 100644 --- a/zebrad/src/components/inbound.rs +++ b/zebrad/src/components/inbound.rs @@ -247,7 +247,11 @@ impl Service for Inbound { zn::Request::BlocksByHash(hashes) => { // Correctness: // - // We can't use `call_all` here, because it leaks buffer slots: + // We can't use `call_all` here, because it can hold one buffer slot per concurrent + // future, until the `CallAll` struct is dropped. We can't hold those slots in this + // future because: + // * we're not sure when the returned future will complete, and + // * we don't limit how many returned futures can be concurrently running // https://github.com/tower-rs/tower/blob/master/tower/src/util/call_all/common.rs#L112 use futures::stream::TryStreamExt; hashes