Argument parsing
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "threadpool.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <threads.h>
|
||||
|
||||
struct thread_pool_queue {
|
||||
Task task;
|
||||
void *arg;
|
||||
struct thread_pool_queue *next;
|
||||
};
|
||||
|
||||
struct _ThreadPool {
|
||||
size_t nthreads;
|
||||
thrd_t *threads;
|
||||
|
||||
struct thread_pool_queue *queue;
|
||||
};
|
||||
|
||||
ThreadPool *make_thread_pool(int parallelism) {
|
||||
ThreadPool *pool = malloc(sizeof(ThreadPool));
|
||||
pool->nthreads = parallelism;
|
||||
}
|
||||
|
||||
void destroy_thread_pool(ThreadPool *pool) {}
|
||||
|
||||
void thread_pool_enqueue(Task task, void *arg) {}
|
||||
Reference in New Issue
Block a user