ID EN
Multiprocessing

ThreadPool

Python 3.11

A thread pool object which controls a pool of worker threads to which jobs can be submitted. ThreadPool instances are fully interface compatible with Pool instances, and their resources must also be properly managed, either by using the pool as a context manager or by calling close() and terminate() manually.

Syntax

PYTHON
class multiprocessing.pool.ThreadPool([processes[, initializer[, initargs]]])

See Also

ThreadPool Pool close() terminate() os.cpu_count() Pool ThreadPool Pool