embassy
embassy copied to clipboard
Implement CellWakerRegistration
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.