14 lines
282 B
C
14 lines
282 B
C
#ifndef INCLUDED_THREAD_POOL_H
|
|
#define INCLUDED_THREAD_POOL_H
|
|
|
|
typedef struct _ThreadPool ThreadPool;
|
|
typedef void (*Task)(void *);
|
|
|
|
ThreadPool *make_thread_pool(int parallelism);
|
|
|
|
void destroy_thread_pool(ThreadPool *pool);
|
|
|
|
void thread_pool_enqueue(Task task, void *arg);
|
|
|
|
#endif
|