embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Implement CellWakerRegistration

Open tomkris opened this issue 7 months ago • 0 comments

embassy_sync::waitqueue::WakerRegistration requires mutable reference for doing register/wake operations.

In some cases there is no mutable reference to WakerRegistration available. This can be worked around by using RefCell<WakerRegistration> which has small runtime and memory overhead.

I'm implementing an alternative CellWakerRegistration which implements interior mutability based on Cell. It provides same functionality, but register/wake functions accept shared &CellWakerRegistration and do not have memory or runtime borrow checking overhead.

tomkris avatar May 14 '25 07:05 tomkris