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:
Vsevolod Stakhov
2022-05-27 17:17:33 +01:00
committed by GitHub
parent 13900dfeea
commit 6fa4a0e3c7
3 changed files with 18 additions and 6 deletions
+5 -1
View File
@@ -1129,7 +1129,11 @@ fn context_holds_onto_message_until_enough_signals_received() {
let mut ctx = OverseerSubsystemContext::new(
signal_rx,
stream::select(bounded_rx, unbounded_rx),
stream::select_with_strategy(
bounded_rx,
unbounded_rx,
orchestra::select_message_channel_strategy,
),
channels_out,
to_overseer_tx,
"test",