add comment about error handling (#1692)

This commit is contained in:
Alfredo Garcia 2021-02-04 23:41:27 -03:00 committed by GitHub
parent 1e156a5d60
commit e455c3fa8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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(()))