betty.multiprocessing module

Multiprocessing functionality.

class betty.multiprocessing.ProcessPoolExecutor

Bases: ProcessPoolExecutor

Like concurrent.futures.ProcessPoolExecutor, but with error handling and low memory consumption.

This uses the spawn method to create new processes, which is the Python 3.14 default.

This ignores SIGINT/KeyboardInterrupt delivered to it by the parent process to prevent unhelpful additional KeyboardInterrupt being raised from within the process pool.

__init__(max_workers: int | None = None, *, max_tasks_per_child: int | None = None)

Initialize a new instance.