Skip to content

feat: Add blocking sleeper for blocking retry#138

Merged
Xuanwo merged 1 commit intomainfrom
blocking-sleep
Aug 30, 2024
Merged

feat: Add blocking sleeper for blocking retry#138
Xuanwo merged 1 commit intomainfrom
blocking-sleep

Conversation

@Xuanwo
Copy link
Copy Markdown
Owner

@Xuanwo Xuanwo commented Aug 30, 2024

No description provided.

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo merged commit 7ffcbd0 into main Aug 30, 2024
@Xuanwo Xuanwo deleted the blocking-sleep branch August 30, 2024 16:45
Comment on lines +23 to 26
default = ["std-blocking-sleep", "tokio-sleep", "gloo-timers-sleep"]
std-blocking-sleep = []
gloo-timers-sleep = ["dep:gloo-timers", "gloo-timers?/futures"]
tokio-sleep = ["dep:tokio", "tokio?/time"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I may prefer default to none and only opt-in features when necessary.

For example, most users of tokio-sleep don't need gloo-timers-sleep. Although, currently we can use "default-feature = false".

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The motivation for this change is to ensure that backon's old users can continue working smoothly after upgrading to v1.0. We can revisit this while preparing for v2.0. However, since this change can break users silently, it might be best to leave it as is.

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