Skip to content

Conversation

@fko-kuptec
Copy link
Contributor

This pull request is my first attempt at fixing #7.

A downside to this way of fixing it is, that polling a future would cause many redundant wakers to get scheduled. But I don't know if there is any way to avoid this with the current API of embassy-time-driver.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Nov 9, 2025

Thank you for your contribution!
I'm on travel ATM and will be able to look at it mid to end of next week.

But yeah, the problem does not have a trivial solution, as you found out. The major roadblock for an easier mapping of the async-io Timer API to embassy-time is that the Future trait is implemented directly on async_io::Timer which is at odds with the embassy-time API, where the Timer type has an explicit Timer::wait method which returns a sub-future. Hence all hacks in the code.

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