worker: removed thread limit 21/181521/6
authorMichal Kolodziejski <m.kolodziejs@samsung.com>
Thu, 14 Jun 2018 10:48:42 +0000 (12:48 +0200)
committerMichal Kolodziejski <m.kolodziejs@samsung.com>
Tue, 19 Jun 2018 09:56:44 +0000 (11:56 +0200)
Change-Id: Id35ef9a6aacfede7c7ead9df86ff44b6c8d833e4
Signed-off-by: Michal Kolodziejski <m.kolodziejs@samsung.com>
src/worker.c

index d8b0164..d51e0af 100644 (file)
@@ -21,7 +21,7 @@
 #include "log.h"
 #include "err-check.h"
 
-#define MAX_THREAD_DEFAULT 1
+#define THREADS_NO_LIMIT -1
 
 static void worker_function(gpointer data, gpointer user_data);
 
@@ -35,7 +35,7 @@ worker_t *worker_create()
     GError *err = NULL;
     struct worker *_worker = g_malloc(sizeof(struct worker));
 
-    _worker->thread_pool = g_thread_pool_new((GFunc)worker_function, NULL, MAX_THREAD_DEFAULT, FALSE, &err);
+    _worker->thread_pool = g_thread_pool_new((GFunc)worker_function, NULL, THREADS_NO_LIMIT, FALSE, &err);
     if (err != NULL)
     {
         ERR("Failed to create thread pool ", err->message);
@@ -59,7 +59,7 @@ void worker_sync(worker_t *worker)
     GError *err = NULL;
 
     g_thread_pool_free(worker->thread_pool, FALSE, TRUE);
-    worker->thread_pool = g_thread_pool_new((GFunc)worker_function, NULL, MAX_THREAD_DEFAULT, FALSE, &err);
+    worker->thread_pool = g_thread_pool_new((GFunc)worker_function, NULL, THREADS_NO_LIMIT, FALSE, &err);
     if (err != NULL)
     {
         ERR("Failed to create thread pool ", err->message);