#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);
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);
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);