summaryrefslogtreecommitdiff
path: root/src/threadpool.c
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-06-09 15:03:19 -0500
committer@syxhe <https://t.me/syxhe>2025-06-09 15:03:19 -0500
commit534a492f2c0bcceac52a287b03dc1ff5eb0b0763 (patch)
tree0869f59e77d5b127b84e2a22015148ce9a8a3c98 /src/threadpool.c
parent08fb644c7d101551edfe8fc2608e0ac501b3df9f (diff)
Trim more fat, add some doxygen markup to the threadpool functions
Diffstat (limited to 'src/threadpool.c')
-rw-r--r--src/threadpool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/threadpool.c b/src/threadpool.c
index bd52c75..681428e 100644
--- a/src/threadpool.c
+++ b/src/threadpool.c
@@ -369,8 +369,10 @@ static int __CTQ_CONSUMER(void *ctq) {
369 task_free(ctask); 369 task_free(ctask);
370 } 370 }
371 371
372 thrd_exit(1); // non-zero indicates error, -1 indicates invalid argument 372 thrd_exit(1);
373} 373}
374// TODO: Make this function return 0 or -1 depending on whether the overall ctq has been canceled or not. Canceling shouldn't
375// be treated as an error
374 376
375int ctqueue_start(ctqueue *ctq) { 377int ctqueue_start(ctqueue *ctq) {
376 if(!ctq) ERRRET(EINVAL, -1); 378 if(!ctq) ERRRET(EINVAL, -1);