summaryrefslogtreecommitdiffstats
path: root/misc/thread_pool.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-01 20:32:01 +0200
committerwm4 <wm4@nowhere>2017-04-01 20:32:01 +0200
commitec3dd7164ceea9ceda71e05e774501874fd20924 (patch)
tree7be23c4ff8da7fb1e612b8aba66f0c512dcc632d /misc/thread_pool.h
parent7bab24b9b3b0621a3e91da0ac7585fd0c55085e3 (diff)
downloadmpv-ec3dd7164ceea9ceda71e05e774501874fd20924.tar.bz2
mpv-ec3dd7164ceea9ceda71e05e774501874fd20924.tar.xz
misc: add a thread pool
To be used by the following commits.
Diffstat (limited to 'misc/thread_pool.h')
-rw-r--r--misc/thread_pool.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/thread_pool.h b/misc/thread_pool.h
new file mode 100644
index 0000000000..c7af7b2b57
--- /dev/null
+++ b/misc/thread_pool.h
@@ -0,0 +1,10 @@
+#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 threads);
+void mp_thread_pool_queue(struct mp_thread_pool *pool, void (*fn)(void *ctx),
+ void *fn_ctx);
+
+#endif