From 67a260d63f971a6dca2b8716a220831928661085 Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 18 Jul 2022 12:09:19 +0200 Subject: Implement a Worker ThreadPool This PR implements a worked thread pool. It uses a fixed amount of threads in a pool and allows scheduling tasks that can be run on threads (and then waited for). It satisfies the following use cases: * HTML5 thread count is fixed (and similar restrictions are known in consoles) so we need to reuse threads. * Thread spawning is slow in general, so reusing threads is faster anyway. * This implementation supports recursive waiting for tasks, making it less prone to deadlocks if threads from the pool also run tasks. After this is approved and merged, subsequent PRs will be needed to replace the ThreadWorkPool usage by this class. --- doc/classes/@GlobalScope.xml | 2 ++ doc/classes/ProjectSettings.xml | 6 +++++ doc/classes/WorkerThreadPool.xml | 53 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 doc/classes/WorkerThreadPool.xml (limited to 'doc/classes') diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 7acec9e63b..fbeda641ad 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1222,6 +1222,8 @@ The [VisualScriptCustomNodes] singleton. + + The [XRServer] singleton. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 898d34b385..f7567133cd 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1986,6 +1986,12 @@ + + + + + + Action map configuration to load by default. diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml new file mode 100644 index 0000000000..22eabf9012 --- /dev/null +++ b/doc/classes/WorkerThreadPool.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3