from . import base
from kombu.asynchronous import timer as _timer
from typing import Any, Optional

class Timer(_timer.Timer):
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    def clear(self) -> None: ...
    @property
    def queue(self): ...

class TaskPool(base.BasePool):
    Timer: Any = ...
    signal_safe: bool = ...
    is_green: bool = ...
    task_join_will_block: bool = ...
    Pool: Any = ...
    spawn_n: Any = ...
    timeout: Any = ...
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    def on_start(self) -> None: ...
    def on_stop(self) -> None: ...
    def on_apply(self, target: Any, args: Optional[Any] = ..., kwargs: Optional[Any] = ..., callback: Optional[Any] = ..., accept_callback: Optional[Any] = ..., timeout: Optional[Any] = ..., timeout_callback: Optional[Any] = ..., apply_target: Any = ..., **_: Any): ...
    def grow(self, n: int = ...) -> None: ...
    def shrink(self, n: int = ...) -> None: ...
    @property
    def num_processes(self): ...
