paritytech / orchestra

A partial actor pattern with a global orchestrator.
GNU General Public License v3.0
27 stars 3 forks source link

Add priorities support for the bounded metered channels #63

Closed vstakhov closed 1 year ago

vstakhov commented 1 year ago

This PR adds _priority set of methods to send messages over channels with higher priority.

TODO: document the logic and add proc-macro support to the orchestra

vstakhov commented 1 year ago

The MeteredSender should wrap a priority_channels Vec<Sender<MaybeTimeOfFlight<T>>> instead of Option. Then we can poll these first before the bulk one.

Yes, I also like this idea.