:py:mod:`cobra.util.process_pool` ================================= .. py:module:: cobra.util.process_pool .. autoapi-nested-parse:: Provide a process pool with enhanced performance on Windows. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cobra.util.process_pool.ProcessPool .. py:class:: ProcessPool(processes: Optional[int] = None, initializer: Optional[Callable] = None, initargs: Tuple = (), maxtasksperchild: Optional[int] = None, **kwargs) Define a process pool that handles the Windows platform specially. .. py:method:: __getattr__(name: str, **kwargs) -> Any Defer attribute access to the pool instance. .. py:method:: __enter__() -> ProcessPool Enable context management. .. py:method:: __exit__(exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]) -> Optional[bool] Clean up resources when leaving a context. .. py:method:: close() -> None Close the process pool. Prevent any more tasks from being submitted to the pool. Once all the tasks have been completed, the worker processes will exit. .. py:method:: _clean_up() -> None Remove the dump file if it exists.