import asyncio as asyncio
from _typeshed import Unused
from collections.abc import Callable, Coroutine
from typing import Any

from .langhelpers import memoized_property

def is_exit_exception(e): ...
def await_only(awaitable: Coroutine[Any, Any, Any]) -> Any: ...
def await_fallback(awaitable: Coroutine[Any, Any, Any]) -> Any: ...
async def greenlet_spawn(fn: Callable[..., Any], *args, _require_await: bool = ..., **kwargs) -> Any: ...

class AsyncAdaptedLock:
    @memoized_property
    def mutex(self): ...
    def __enter__(self): ...
    def __exit__(self, *arg: Unused, **kw: Unused) -> None: ...

def get_event_loop(): ...
