Skip to content

Commit

Permalink
Decrease recorder thread priority
Browse files Browse the repository at this point in the history
Recording is background task, writing the packets to a file is not
urgent.
  • Loading branch information
rom1v committed Mar 10, 2023
1 parent aa450ff commit 408f458
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/recorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 408f458

Please sign in to comment.