Skip to content

Commit c8ebd96

Browse files
committed
client: Add documentation for handling dual futures
This is confusing for sure. Closes: #71 Signed-off-by: Colin Walters <[email protected]>
1 parent ab5c34b commit c8ebd96

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/imageproxy.rs

+5
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,11 @@ impl ImageProxy {
545545
/// <https://github.com/opencontainers/image-spec/blob/main/descriptor.md>
546546
///
547547
/// The requested size and digest are verified (by the proxy process).
548+
///
549+
/// Note that because of the implementation details of this function, you should
550+
/// [`futures::join!`] the returned futures instead of polling one after the other. The
551+
/// secondary "driver" future will only return once everything has been read from
552+
/// the reader future.
548553
#[instrument]
549554
pub async fn get_blob(
550555
&self,

0 commit comments

Comments
 (0)