You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#163 has introduced support for #[no_std] environments, but in order to achieve that it has implemented a less efficient version of WakerArray and WakerVec, which wake all of their child futures every time they're woken. We should implement a more efficient version of this which works on #[no_std] environments.
This is not needed for correctness; merely for efficiency. But especially on embedded environments, efficiency matters - so it really would be great if we could tackle this. Thanks!
The text was updated successfully, but these errors were encountered:
I think that precise waking is going to require some sort of allocator. The waker context needs to be able to outlive the associated future. In no_std you could do something like a static arena of wakers you can allocate from. You would probably also want some way to define the size of that arena at compile time.
For alloc it's significantly simpler. I think the goal here should be to make ReadinessVec/ReadinessArray lock-free which would enable their use in both std and alloc contexts (and maybe improve performance at the same time).
yoshuawuyts
changed the title
Implement precise waking on no_std targets
Implement precise waking on alloc targets
Mar 11, 2024
In no_std you could do something like a static arena of wakers you can allocate from. You would probably also want some way to define the size of that arena at compile time.
I've experimented with this approach but haven't found a way to make it ergonomic. With TAIT it becomes possible to define type-inferred statics with a macro, which might help
#163 has introduced support for
#[no_std]
environments, but in order to achieve that it has implemented a less efficient version ofWakerArray
andWakerVec
, which wake all of their child futures every time they're woken. We should implement a more efficient version of this which works on#[no_std]
environments.This is not needed for correctness; merely for efficiency. But especially on embedded environments, efficiency matters - so it really would be great if we could tackle this. Thanks!
The text was updated successfully, but these errors were encountered: