From e455c3fa8a215a4e63ae939442914d62c434ac0a Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Thu, 4 Feb 2021 23:41:27 -0300 Subject: [PATCH] add comment about error handling (#1692) --- tower-batch/src/service.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tower-batch/src/service.rs b/tower-batch/src/service.rs index 6ddeb215..7015af3c 100644 --- a/tower-batch/src/service.rs +++ b/tower-batch/src/service.rs @@ -94,6 +94,9 @@ where // Then, poll to acquire a semaphore permit. If we acquire a permit, // then there's enough buffer capacity to send a new request. Otherwise, // we need to wait for capacity. + + // In tokio 0.3.7, `acquire_owned` panics if its semaphore returns an error, + // so we don't need to handle errors until we upgrade to tokio 1.0. ready!(self.semaphore.poll_acquire(cx)); Poll::Ready(Ok(()))