model / threads: remove global get_next_id() interface
[cdsspec-compiler.git] / execution.cc
index 0ec13900b4e56b4bde68db8978bd9d5202b28946..fe9175b2fb336965e3aa23f867432fabee1441d3 100644 (file)
@@ -911,7 +911,7 @@ bool ModelExecution::process_thread_action(ModelAction *curr)
        case THREAD_CREATE: {
                thrd_t *thrd = (thrd_t *)curr->get_location();
                struct thread_params *params = (struct thread_params *)curr->get_value();
-               Thread *th = new Thread(thrd, params->func, params->arg, get_thread(curr));
+               Thread *th = new Thread(get_next_id(), thrd, params->func, params->arg, get_thread(curr));
                add_thread(th);
                th->set_creation(curr);
                /* Promises can be satisfied by children */