retry
retry copied to clipboard
async support
I just came across this library and I definitely would want to use it but I can't because it doesn't support futures.
I know there are a couple of implementations as PRs already but I'm opening this to push for a decision now that the async ecosystem is probably mature enough.
I think we should do something, because having to have two retry crates isn't super sensible; but we probably need to be smart about the runtime binding to sleep(); since we shouldn't block the thread, but -last I checked - core rust doesn't define a sleep async primitive.
Maybe can use some dependency injection here? So the caller can specify what sleep api to call, be it tokio::time::sleep
or something else?
Edit: I guess #28 is using dependency injection here
I'm personally not inclined to develop this crate further. I think async retries should be in a separate crate. But since I'm not very active in free software development anymore, I won't stop the other folks with repo/crate access if they want to build and maintain it.
@jimmycuadra any chanced we could get https://github.com/jimmycuadra/retry/pull/44 merged?