From 60715c7785e7fbe4759df64258ad58a8e2a0769d Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Fri, 16 May 2025 19:09:02 -0500 Subject: Do some more work on the concurrent queue --- src/threadpool.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/threadpool.h') diff --git a/src/threadpool.h b/src/threadpool.h index db6fa2e..d7b713c 100644 --- a/src/threadpool.h +++ b/src/threadpool.h @@ -9,12 +9,18 @@ typedef struct cq cqueue; typedef struct tp threadpool; task * task_init(task_callback cb, void *arg); -void task_free(task *ts); +void task_free(void *ts); int task_fire(task *ts); cqueue * cqueue_init(); void cqueue_cancel(cqueue * const cq); void cqueue_free(void *cq); - +int cqueue_addtask(cqueue * const cq, task * const tsk); +task * cqueue_waitpop(cqueue * const cq); +int cqueue_registerthreads(cqueue * const cq, int threads); +int cqueue_registerthread(cqueue * const cq); +int cqueue_iscanceled(cqueue * const cq); +int cqueue_numthreads(cqueue * const cq); +int cqueue_numtasks(cqueue * const cq); #endif \ No newline at end of file -- cgit v1.2.3