From b04c4d4ec6ba5f7f5e8ce11c3ffd823637fe989d Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Tue, 19 Nov 2024 14:42:18 -0800 Subject: [PATCH] add comments --- aws-s3-transfer-manager/src/io/aggregated_bytes.rs | 1 - aws-s3-transfer-manager/src/operation/download/handle.rs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aws-s3-transfer-manager/src/io/aggregated_bytes.rs b/aws-s3-transfer-manager/src/io/aggregated_bytes.rs index 2a6a0fd..1ba309d 100644 --- a/aws-s3-transfer-manager/src/io/aggregated_bytes.rs +++ b/aws-s3-transfer-manager/src/io/aggregated_bytes.rs @@ -11,7 +11,6 @@ use bytes_utils::SegmentedBuf; use crate::error::ErrorKind; -/// /// Non-contiguous Binary Data Storage /// /// When data is read from the network, it is read in a sequence of chunks that are not in diff --git a/aws-s3-transfer-manager/src/operation/download/handle.rs b/aws-s3-transfer-manager/src/operation/download/handle.rs index e1a8c3c..63689f3 100644 --- a/aws-s3-transfer-manager/src/operation/download/handle.rs +++ b/aws-s3-transfer-manager/src/operation/download/handle.rs @@ -69,6 +69,8 @@ impl DownloadHandle { self.body.close(); self.discovery.await??; + // It's safe to grab the lock here because discovery is already complete, and we will never + // lock tasks again after discovery to spawn more tasks. let mut tasks = self.tasks.lock().await; while let Some(join_result) = tasks.join_next().await { join_result?;