Skip to content

Commit

Permalink
fix deadlock in 'print_progress_bar'
Browse files Browse the repository at this point in the history
  • Loading branch information
jiixyj committed Dec 23, 2021
1 parent 9d5f343 commit 8f1a0f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scanner/scanner-common/scanner-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ print_progress_bar(gpointer arg)
*started = 1;
g_cond_broadcast(&progress_cond);
}
g_cond_wait(&progress_cond, &progress_mutex);

if (total_frames != elapsed_frames) {
g_cond_wait(&progress_cond, &progress_mutex);
}

/* refresh progress bar at max 10 times per second */
gint64 current_time = g_get_monotonic_time();
Expand Down

0 comments on commit 8f1a0f7

Please sign in to comment.