Skip to content

feat: Add embassy-based sleeper for no_std#173

Merged
Xuanwo merged 8 commits intoXuanwo:mainfrom
wackazong:embassy-sleep
Dec 26, 2024
Merged

feat: Add embassy-based sleeper for no_std#173
Xuanwo merged 8 commits intoXuanwo:mainfrom
wackazong:embassy-sleep

Conversation

@wackazong
Copy link
Copy Markdown
Contributor

No description provided.

@wackazong
Copy link
Copy Markdown
Contributor Author

How do you propose to use the EmbassySleeper? I thought the usage of

backon = { version = "x.z", default-features = false, features = ["embassy-sleep"] }

would automatically activate embassy-sleep for the async and the blocking sleeper. That means if the feature embassy-sleep is active, the DefaultSleeper and the DefaultBlockingSleeper should be the embassy sleepers as far as I can see.

Let me know what you think.

@wackazong
Copy link
Copy Markdown
Contributor Author

Maybe this is a possibility?

@Xuanwo
Copy link
Copy Markdown
Owner

Xuanwo commented Dec 23, 2024

How do you propose to use the EmbassySleeper?

I expect users to use:

fut.retry(builder).sleeper(EmbassyTimerSleeper).await

@wackazong
Copy link
Copy Markdown
Contributor Author

I think this is what you want, right?

@Xuanwo Xuanwo changed the title Add embassy-based sleeper for no_std feat: Add embassy-based sleeper for no_std Dec 26, 2024
Copy link
Copy Markdown
Owner

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you @wackazong for building this, really appricated!

@Xuanwo Xuanwo merged commit 1582dbc into Xuanwo:main Dec 26, 2024
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