Skip to content

Failed demo for retry: we can't retry a future directly - #1

Closed
Xuanwo wants to merge 1 commit into
mainfrom
failed-demo
Closed

Failed demo for retry: we can't retry a future directly#1
Xuanwo wants to merge 1 commit into
mainfrom
failed-demo

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Apr 13, 2022

Copy link
Copy Markdown
Owner

This is a failed demo for retry implementation.

However, submitting as a PR for a record is still valuable. I learned a lot during implementing it.

It's useful for users who want to build general utils on all futures/async functions.


  • Good: This demo works on all futures that return Result, including async functions like async fn test_fn() -> Result<()>
  • Good: This demo showed up that we can add new features via adding new traits.
  • Bad: This demo won't work as we can't retry the existing future.
    • Possible solution: Make the future Clone (doesn't make sense)

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo

Xuanwo commented Apr 13, 2022

Copy link
Copy Markdown
Owner Author

This PR is just for the record, and I confirmed that it won't work.

Let's close it.

@Xuanwo Xuanwo closed this Apr 13, 2022
@Xuanwo
Xuanwo deleted the failed-demo branch April 13, 2022 02:13
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.

1 participant