cobra.util.process_pool

Provide a process pool with enhanced performance on Windows.

Module Contents

Classes

ProcessPool

Define a process pool that handles the Windows platform specially.

class cobra.util.process_pool.ProcessPool(processes: Optional[int] = None, initializer: Optional[Callable] = None, initargs: Tuple = (), maxtasksperchild: Optional[int] = None, **kwargs)[source]

Define a process pool that handles the Windows platform specially.

__getattr__(name: str, **kwargs) Any[source]

Defer attribute access to the pool instance.

__enter__() ProcessPool[source]

Enable context management.

__exit__(exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]) Optional[bool][source]

Clean up resources when leaving a context.

close() None[source]

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.

_clean_up() None[source]

Remove the dump file if it exists.