Add a delay when starting the polling thread in lqos_node_manager

to let the server finish starting.

The delay is in the polling thread, not global - so it doesn't
cause a stall, or affect data access. The ringbuffer will be
slightly delayed in starting (and show zeroes until then).

Testing shows no more logged messages on reboot.

ISSUE #235
This commit is contained in:
Herbert Wolverson 2023-02-01 22:29:55 +00:00
parent cb3fa889fb
commit 911f107f3f

View File

@ -31,6 +31,7 @@ pub async fn update_tracking() {
let interval_ms = 1000;
info!("Updating throughput ring buffer at {interval_ms} ms cadence.");
std::thread::sleep(std::time::Duration::from_secs(10));
let monitor_busy = AtomicBool::new(false);
if let Ok(timer) =
TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty())