mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 03:11:01 +00:00
Check unbounded channel first when polling for subsystem mesages (#5566)
* Prefer unbounded channel when selecting rx events * Fix tests * Forgotten fmt recursion * Extract strategy functor to allow easier modifications
This commit is contained in:
@@ -605,9 +605,10 @@ pub(crate) fn impl_builder(info: &OrchestraInfo) -> proc_macro2::TokenStream {
|
||||
};
|
||||
|
||||
let unbounded_meter = #channel_name_unbounded_rx.meter().clone();
|
||||
|
||||
let message_rx: SubsystemIncomingMessages< #consumes > = #support_crate ::select(
|
||||
#channel_name_rx, #channel_name_unbounded_rx
|
||||
// Prefer unbounded channel when selecting
|
||||
let message_rx: SubsystemIncomingMessages< #consumes > = #support_crate ::select_with_strategy(
|
||||
#channel_name_rx, #channel_name_unbounded_rx,
|
||||
#support_crate ::select_message_channel_strategy
|
||||
);
|
||||
let (signal_tx, signal_rx) = #support_crate ::metered::channel(
|
||||
self.signal_capacity.unwrap_or(SIGNAL_CHANNEL_CAPACITY)
|
||||
|
||||
Reference in New Issue
Block a user