from typing import Any, Optional

def apply_target(target: Any, args: Any = ..., kwargs: Optional[Any] = ..., callback: Optional[Any] = ..., accept_callback: Optional[Any] = ..., pid: Optional[Any] = ..., 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: Optional[Any] = ..., putlocks: bool = ..., forking_enable: bool = ..., callbacks_propagate: Any = ..., app: Optional[Any] = ..., **options: Any) -> None: ...
    def on_start(self) -> None: ...
    def did_start_ok(self): ...
    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: Optional[Any] = ...) -> 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: Optional[Any] = ..., kwargs: Optional[Any] = ..., **options: Any): ...
    @property
    def info(self): ...
    @property
    def active(self): ...
    @property
    def num_processes(self): ...
