perf(baseliner): bound the reselection channel to prevent memory buildup

Change the reselection channel from unbounded to a size of 1 and use non-blocking sends to avoid unnecessary queuing of reselection triggers.
This commit is contained in:
Nils Andreas Svee committed 2026-07-17 11:39:07 +07:00
1 parent 9811592f13
commit 50f0dcb4dd
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -265,7 +265,7 @@ fn run(config: Config) -> anyhow::Result<()> {
let (baseliner_stats_tx, baseliner_stats_rx) = flume::unbounded();
let (error_tx, error_rx) = flume::unbounded::<anyhow::Error>();
let (reselect_tx, reselect_rx) = flume::unbounded();
let (reselect_tx, reselect_rx) = flume::bounded(1);
let dropped = Arc::new(AtomicU32::new(0));