diff options
author | reduz <reduzio@gmail.com> | 2022-07-18 12:09:19 +0200 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-07-22 11:46:48 +0200 |
commit | 67a260d63f971a6dca2b8716a220831928661085 (patch) | |
tree | b316d47e6cd8de6a11e412150deadedc950367a0 /thirdparty/icu4c/common/ucnv_lmb.cpp | |
parent | ed926c4ec1cfadf7e6891e03073e517407ad8d05 (diff) |
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.
Diffstat (limited to 'thirdparty/icu4c/common/ucnv_lmb.cpp')
0 files changed, 0 insertions, 0 deletions