V0.8: do not schedule function calls.

This patch mirrors what was done in development to force a function
call to be run immediately.
This commit is contained in:
Cary R 2008-11-26 20:02:01 -08:00 committed by Stephen Williams
parent 12d5aa08e2
commit 113312a0c1
1 changed files with 8 additions and 1 deletions

View File

@ -1380,7 +1380,14 @@ bool of_FORK(vthread_t thr, vvp_code_t cp)
thr->fork_count += 1;
schedule_vthread(child, 0, true);
/* If the new child was created to evaluate a function,
run it immediately, then return to this thread. */
if (cp->scope->base.vpi_type->type_code == vpiFunction) {
child->is_scheduled = 1;
vthread_run(child);
} else {
schedule_vthread(child, 0, true);
}
return true;
}