Closed zeenix closed 3 years ago
Converting it into a draft as this is broken for awaiting receivers. I'm working on it..
Gah, the calculations/algorithm required here turned out to be quite a pickle. I have pushed my WIP work here and with the last commit the existing and the newly added test succeed now but testing it against zbus, reveals it's still broken as messages just get lost. So I could really use some help here or at least a second pair of eyes.
@yoshuawuyts @elmarco @tv42 ^
The WIP work I just pushed seems to work fine. There is still at least one issue (if latest messages are dropped on capacity change, receivers are wrongly adjusted) and need to optimize the code a bit but hopefully the hard part is done and I can fix this today.
I think I got it working, based on all the testing I can give it. If anyone else can have a look and tell me if this can be improved, please do let me know.
All my testing has been green so far, so I'm merging this already. We can always fix things later if needed.
This PR adds:
Add a notion of message priority (used by the other two API). In the end, this will just complicate things and I don't see people wanting to delete newer messages on channel shrinkSender::{try_broadcast, broadcast}
caller.