"""
This type stub file was generated by pyright.
"""

from typing import Any, Callable, TYPE_CHECKING
from collections.abc import Sequence

"""Parallel building utilities."""
HAS_MULTIPROCESSING = ...
if TYPE_CHECKING:
    ...
logger = ...
parallel_available = ...
class SerialTasks:
    """Has the same interface as ParallelTasks, but executes tasks directly."""
    def __init__(self, nproc: int = ...) -> None:
        ...
    
    def add_task(self, task_func: Callable, arg: Any = ..., result_func: Callable | None = ...) -> None:
        ...
    
    def join(self) -> None:
        ...
    


class ParallelTasks:
    """Executes *nproc* tasks in parallel after forking."""
    def __init__(self, nproc: int) -> None:
        ...
    
    def add_task(self, task_func: Callable, arg: Any = ..., result_func: Callable | None = ...) -> None:
        ...
    
    def join(self) -> None:
        ...
    
    def terminate(self) -> None:
        ...
    


def make_chunks(arguments: Sequence[str], nproc: int, maxbatch: int = ...) -> list[Any]:
    ...

