import asyncio
from types import FrameType
from typing import Optional, Sequence, Union

def register_thread(id: int, native_id: int, name: str) -> None: ...  # noqa: A002
def unregister_thread(name: str) -> None: ...
def track_asyncio_loop(thread_id: int, loop: Optional[asyncio.AbstractEventLoop]) -> None: ...
def link_tasks(parent: asyncio.AbstractEventLoop, child: asyncio.Task) -> None: ...
def init_asyncio(
    current_tasks: Sequence[asyncio.Task],
    scheduled_tasks: Sequence[asyncio.Task],
    eager_tasks: Optional[Sequence[asyncio.Task]],
) -> None: ...
def track_greenlet(greenlet_id: int, name: str, frame: Union[FrameType, bool, None]) -> None: ...
def untrack_greenlet(greenlet_id: int) -> None: ...
def link_greenlets(greenlet_id: int, parent_id: int) -> None: ...
def update_greenlet_frame(greenlet_id: int, frame: Union[FrameType, bool, None]) -> None: ...

is_available: bool
failure_msg: str
