Decrease recorder thread priority

Recording is background task, writing the packets to a file is not
urgent.
This commit is contained in:
Romain Vimont 2023-03-08 21:40:39 +01:00
parent aa450ffc3f
commit 408f458636

View file

@ -505,6 +505,10 @@ static int
run_recorder(void *data) { run_recorder(void *data) {
struct sc_recorder *recorder = 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); bool success = sc_recorder_record(recorder);
sc_mutex_lock(&recorder->mutex); sc_mutex_lock(&recorder->mutex);