retry icon indicating copy to clipboard operation
retry copied to clipboard

async support

Open IGI-111 opened this issue 3 years ago • 4 comments

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.

IGI-111 avatar Oct 14 '21 11:10 IGI-111

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.

rbtcollins avatar Mar 23 '22 12:03 rbtcollins

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

cbeck88 avatar Jun 09 '22 19:06 cbeck88

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 avatar Sep 17 '22 10:09 jimmycuadra

@jimmycuadra any chanced we could get https://github.com/jimmycuadra/retry/pull/44 merged?

clarkmcc avatar Mar 23 '23 16:03 clarkmcc