Skip to content

Commit

Permalink
nemo-thumbnails.c: Always have at least 1 thumbnail thread.
Browse files Browse the repository at this point in the history
On a system with a single core, max_threads would evaluate to 0,
and no thumbnailing would take place.
  • Loading branch information
mtwebster committed Mar 25, 2024
1 parent ae1a575 commit 3452f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libnemo-private/nemo-thumbnails.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ get_max_threads (void) {
max_threads = pref;
}

max_threads = CLAMP (max_threads, 1, (num_processors / 2));
max_threads = CLAMP (max_threads, 1, MAX ((num_processors / 2), 1));

#if DEBUG_THREADS
g_message ("Thumbnailer threads: %d (setting: %d, system count: %d)", max_threads, pref, num_processors);
Expand Down

0 comments on commit 3452f4f

Please sign in to comment.