refactor: replace thread-based pool with multiprocessing ProcessPoolExecutor for CPU-bound tasks

The previous thread pool implementation caused GIL contention under heavy CPU workloads. This change swaps concurrent.futures.ThreadPoolExecutor for ProcessPoolExecutor, enabling true parallelism across worker processes. The pool size is now configurable via environment variable and defaults to os.cpu_count(). Task submission and result collection interfaces remain backward-compatible.
This commit is contained in:
2024-12-14 05:33:04 +00:00
parent 98eae03f7a
commit 2f325e1448
3 changed files with 23 additions and 1 deletions
Binary file not shown.
BIN
View File
Binary file not shown.