Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add sleep in README #131

Merged
merged 1 commit into from
Aug 29, 2024
Merged

docs: Add sleep in README #131

merged 1 commit into from
Aug 29, 2024

Conversation

Xuanwo
Copy link
Owner

@Xuanwo Xuanwo commented Aug 29, 2024

No description provided.

@Xuanwo Xuanwo merged commit 64fdcfd into main Aug 29, 2024
7 checks passed
@Xuanwo Xuanwo deleted the polish-readme branch August 29, 2024 16:11
@@ -34,6 +34,8 @@ async fn main() -> Result<()> {
let content = fetch
// Retry with exponential backoff
.retry(ExponentialBuilder::default())
// Sleep implementation, required if no feature has been enabled
.sleep(tokio::time::sleep)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this to the blocking retry example as well? i.e., something like:

.sleep(std::thread::sleep)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me add it:)

Xuanwo pushed a commit that referenced this pull request Sep 4, 2024
### What does this PR do

Based on the
[discussion](#131 (comment)),
mention `sleep()` in the blocking retry examples.

Added to examples in both `README.md` and `lib.rs`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants