diff options
Diffstat (limited to 'src/glibext/delayed.c')
-rw-r--r-- | src/glibext/delayed.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glibext/delayed.c b/src/glibext/delayed.c index caffbaa..6e81c4b 100644 --- a/src/glibext/delayed.c +++ b/src/glibext/delayed.c @@ -32,6 +32,7 @@ #include "delayed-int.h" +#include "../core/nproc.h" #include "../gui/core/global.h" @@ -396,7 +397,7 @@ static void g_work_group_init(GWorkGroup *group) g_atomic_int_set(&group->pending, 0); group->threads = NULL; - group->threads_count = g_get_num_processors(); + group->threads_count = 0; group->force_exit = false; group->callback = NULL; @@ -501,7 +502,7 @@ static GWorkGroup *g_work_group_new(wgroup_id_t id, const guint *count) result->id = id; - result->threads_count = g_get_num_processors(); + result->threads_count = get_max_online_threads(); if (count != NULL && *count < result->threads_count) result->threads_count = *count; |