enhance ordq

This commit is contained in:
Rongsong Shen 2025-12-17 12:14:52 +08:00
parent e85ce0e5ad
commit 48ab2e60a2
4 changed files with 119 additions and 14 deletions

View file

@ -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);