enhance ordq
This commit is contained in:
parent
e85ce0e5ad
commit
48ab2e60a2
4 changed files with 119 additions and 14 deletions
|
|
@ -19,7 +19,7 @@ static void* delay_worker(void* args)
|
|||
pthread_testcancel();
|
||||
sleep(mgr->precision);
|
||||
|
||||
it = ordq_peek(&(mgr->tasks));
|
||||
it = ordq_peek(&(mgr->tasks), NULL);
|
||||
if (it == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ static void* delay_worker(void* args)
|
|||
continue;
|
||||
}
|
||||
|
||||
it = ordq_get(&(mgr->tasks));
|
||||
it = ordq_get(&(mgr->tasks), NULL);
|
||||
t = (delay_task_t*)it->data;
|
||||
|
||||
mgr->runner_fn(t->entry, t->args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue