Update the call_all comment in Inbound (#1737)

This commit is contained in:
teor 2021-02-16 06:14:16 +10:00 committed by GitHub
parent f85006a798
commit 372a432179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -247,7 +247,11 @@ impl Service<zn::Request> 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