summaryrefslogtreecommitdiffstats
path: root/misc/thread_pool.h
blob: 7d5aed05313ea454b1eafb00dfd1812a8e0c7c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef MPV_MP_THREAD_POOL_H
#define MPV_MP_THREAD_POOL_H

struct mp_thread_pool;

struct mp_thread_pool *mp_thread_pool_create(void *ta_parent, int init_threads,
                                             int min_threads, int max_threads);

bool mp_thread_pool_queue(struct mp_thread_pool *pool, void (*fn)(void *ctx),
                          void *fn_ctx);

#endif