From b7017dca6f8b5a7beae6387c6ad873dc8abf2f95 Mon Sep 17 00:00:00 2001 From: Jan Srzednicki Date: Tue, 7 Nov 2023 10:35:16 +0100 Subject: [PATCH] Document using `tokio::time::sleep` (#111) * Document using `tokio::time::sleep` * Update reqwest-retry/src/middleware.rs --------- Co-authored-by: Ethan Brierley --- reqwest-retry/src/middleware.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reqwest-retry/src/middleware.rs b/reqwest-retry/src/middleware.rs index 783c017..d0b2680 100644 --- a/reqwest-retry/src/middleware.rs +++ b/reqwest-retry/src/middleware.rs @@ -12,7 +12,9 @@ use task_local_extensions::Extensions; /// and can be safely executed again. /// /// Currently, it allows setting a [RetryPolicy] algorithm for calculating the __wait_time__ -/// between each request retry. +/// between each request retry. Sleeping on non-`wasm32` archs is performed using +/// [`tokio::time::sleep`], therefore it will respect pauses/auto-advance if run under a +/// runtime that supports them. /// ///```rust /// use reqwest_middleware::ClientBuilder;