MINOR: applet: always use task_new_on() on applet creation
Now that task_new_on() supports negative numbers, there's no need for checking the thread value nor falling back to task_new_anywhere().
This commit is contained in:
parent
1f4bf7215a
commit
3b7a19c2a6
@ -57,11 +57,7 @@ struct appctx *appctx_new_on(struct applet *applet, struct sedesc *sedesc, int t
|
|||||||
}
|
}
|
||||||
appctx->sedesc = sedesc;
|
appctx->sedesc = sedesc;
|
||||||
|
|
||||||
if (thr >= 0)
|
|
||||||
appctx->t = task_new_on(thr);
|
appctx->t = task_new_on(thr);
|
||||||
else
|
|
||||||
appctx->t = task_new_anywhere();
|
|
||||||
|
|
||||||
if (unlikely(!appctx->t))
|
if (unlikely(!appctx->t))
|
||||||
goto fail_task;
|
goto fail_task;
|
||||||
appctx->t->process = task_run_applet;
|
appctx->t->process = task_run_applet;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user