diff --git a/src/backend/threads.c b/src/backend/threads.c index d7d7a242f..773568f7b 100644 --- a/src/backend/threads.c +++ b/src/backend/threads.c @@ -109,7 +109,7 @@ lumiera_thread_run (enum lumiera_thread_class kind, // and let it really run (signal the condition var, the thread waits on it) self->state = LUMIERA_THREADSTATE_WAKEUP; - LUMIERA_CONDITION_SECTION (cond_sync, self->finished) + LUMIERA_CONDITION_SECTION (cond_sync, &self->signal) LUMIERA_CONDITION_SIGNAL; // NOTE: example only, add solid error handling! diff --git a/tests/backend/test-threadpool.c b/tests/backend/test-threadpool.c index b83920330..2acb8b861 100644 --- a/tests/backend/test-threadpool.c +++ b/tests/backend/test-threadpool.c @@ -48,14 +48,14 @@ TESTS_BEGIN TEST ("threadpool-basic") { - lumiera_threadpool_init(100); + lumiera_threadpool_init(); lumiera_threadpool_destroy(); } TEST ("threadpool1") { ECHO("start by initializing the threadpool"); - lumiera_threadpool_init(100); + lumiera_threadpool_init(); LumieraThread t1 = lumiera_threadpool_acquire_thread(LUMIERA_THREADCLASS_INTERACTIVE, "test purpose", @@ -69,7 +69,7 @@ TEST ("threadpool1") TEST ("basic-acquire-release") { ECHO("start by initializing the threadpool"); - lumiera_threadpool_init(100); + lumiera_threadpool_init(); ECHO("acquiring thread 1"); LumieraThread t1 = lumiera_threadpool_acquire_thread(LUMIERA_THREADCLASS_INTERACTIVE, @@ -163,7 +163,7 @@ TEST ("no-function") { LumieraThread t; - lumiera_threadpool_init(10); + lumiera_threadpool_init(); t = lumiera_thread_run (LUMIERA_THREADCLASS_INTERACTIVE, NULL, @@ -184,7 +184,7 @@ TEST ("process-function") LumieraThread t; int number = 440616; - lumiera_threadpool_init(10); + lumiera_threadpool_init(); ECHO ("the input to the function is %d", number);