mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-26 19:06:31 +00:00
Document using tokio::time::sleep
(#111)
* Document using `tokio::time::sleep` * Update reqwest-retry/src/middleware.rs --------- Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
This commit is contained in:
parent
304d6f1ebc
commit
b7017dca6f
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ use task_local_extensions::Extensions;
|
||||||
/// and can be safely executed again.
|
/// and can be safely executed again.
|
||||||
///
|
///
|
||||||
/// Currently, it allows setting a [RetryPolicy] algorithm for calculating the __wait_time__
|
/// 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
|
///```rust
|
||||||
/// use reqwest_middleware::ClientBuilder;
|
/// use reqwest_middleware::ClientBuilder;
|
||||||
|
|
Loading…
Reference in a new issue