C-Thread-Pool
C-Thread-Pool copied to clipboard
A minimal but powerful thread pool in ANSI C
This counters will help track the progress of the jobs placed on the pool. After placing some jobs, one can easily check the progress of the total work by ```...
I have an application using Thread Pool that will often result in job queues of more than 25,000 jobs. This is expected and the delay in processing the jobs isn't...
Hi Guys Great idea to make a simple ANSI-C threadpool. The interface is great, but I have encountered numerous problems using it. 1) In your example: After adding the work...
thpool.c line 285 *thread_p = (struct thread*)malloc(sizeof(struct thread)); if (thread_p == NULL){ err("thread_init(): Could not allocate memory for thread\n"); return -1; } ///should change to next *thread_p = (struct thread*)malloc(sizeof(struct...
the problem is that I defined a struct to store the variable i changed in a foop loop, but after I added all works, then I use function thpool_wait() to...
Current threadpool in this project creates threads statically when it is initialized. And number of threads is fixed during its lifecycle. Why not create and destroy threads dynamically? Create: >...
I have three files : main.c, functions.c and functions.h, can i compile using something like this "gcc main.c functions.c thpool.c -D THPOOL_DEBUG -pthread -o main"?
cmake
Hello, Is there an API to destroy a pool without waiting for executing threads to complete? Or is it easy to create one based on the current destroy API ?...