from typing import Any

__all__ = ("BasePool", "apply_target")

def apply_target(
    target: Any,
    args: Any = ...,
    kwargs: Any | None = ...,
    callback: Any | None = ...,
    accept_callback: Any | None = ...,
    pid: Any | None = ...,
    getpid: Any = ...,
    propagate: Any = ...,
    monotonic: Any = ...,
    **_: Any,
) -> None: ...

class BasePool:
    RUN: int
    CLOSE: int
    TERMINATE: int
    Timer: Any
    signal_safe: bool
    is_green: bool
    uses_semaphore: bool
    task_join_will_block: bool
    body_can_be_buffer: bool
    limit: Any
    putlocks: Any
    options: Any
    forking_enable: Any
    callbacks_propagate: Any
    app: Any
    def __init__(
        self,
        limit: Any | None = ...,
        putlocks: bool = ...,
        forking_enable: bool = ...,
        callbacks_propagate: Any = ...,
        app: Any | None = ...,
        **options: Any,
    ) -> None: ...
    def on_start(self) -> None: ...
    def did_start_ok(self) -> Any: ...
    def flush(self) -> None: ...
    def on_stop(self) -> None: ...
    def register_with_event_loop(self, loop: Any) -> None: ...
    def on_apply(self, *args: Any, **kwargs: Any) -> None: ...
    def on_terminate(self) -> None: ...
    def on_soft_timeout(self, job: Any) -> None: ...
    def on_hard_timeout(self, job: Any) -> None: ...
    def maintain_pool(self, *args: Any, **kwargs: Any) -> None: ...
    def terminate_job(self, pid: Any, signal: Any | None = ...) -> None: ...
    def restart(self) -> None: ...
    def stop(self) -> None: ...
    def terminate(self) -> None: ...
    def start(self) -> None: ...
    def close(self) -> None: ...
    def on_close(self) -> None: ...
    def apply_async(
        self,
        target: Any,
        args: Any | None = ...,
        kwargs: Any | None = ...,
        **options: Any,
    ) -> Any: ...
    @property
    def info(self) -> Any: ...
    @property
    def active(self) -> Any: ...
    @property
    def num_processes(self) -> Any: ...
