"""Executor protocol."""
from __future__ import annotations

from typing import Any, Callable, Protocol


class Executor(Protocol):
    async def submit(self, fn: Callable, *args: Any, **kwargs: Any) -> Any:
        """Submit a callable for execution and return the result."""
        ...

    async def shutdown(self) -> None:
        """Shutdown the executor."""
        ...
