From 8fe1a7ea459829145dfef4b0aa8f627f96841cbd Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Sun, 18 May 2025 04:48:30 -0500 Subject: Still crashing. Lovely --- src/main.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 97310fc..73169d1 100755 --- a/src/main.c +++ b/src/main.c @@ -5,10 +5,33 @@ #include "shared.h" #include "threadpool.h" -#include "errno.h" -#include "error.h" +#include +#include +#include +#include + +int testcb(void *arg) { + if(!arg) + return -1; + + printf("%s\n", (char*)arg); + + return 0; +} int main() { - error(-1, ENOTSUP, "lol"); + // error(-1, ENOTSUP, "lol"); + + cqueue *cq = cqueue_init(); + // if(!cq) + // abort(); + + cqueue_registerthreads(cq, 10); + cqueue_addtask(cq, task_init(testcb, "this is some data")); + + sleep(3); + + cqueue_free(cq); + return 0; } \ No newline at end of file -- cgit v1.2.3