From 408f45863617465cee36453fb9ce2c7403e159e0 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 8 Mar 2023 21:40:39 +0100 Subject: [PATCH] Decrease recorder thread priority Recording is background task, writing the packets to a file is not urgent. --- app/src/recorder.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/recorder.c b/app/src/recorder.c index af5fe510..572d3e24 100644 --- a/app/src/recorder.c +++ b/app/src/recorder.c @@ -505,6 +505,10 @@ static int run_recorder(void *data) { struct sc_recorder *recorder = data; + // Recording is a background task + bool ok = sc_thread_set_priority(SC_THREAD_PRIORITY_LOW); + (void) ok; // We don't care if it worked + bool success = sc_recorder_record(recorder); sc_mutex_lock(&recorder->mutex);