import uio
from . import core as core
from collections.abc import Generator
from typing import Any

class Event:
    state: bool
    waiting: Any
    def __init__(self) -> None: ...
    def is_set(self): ...
    def set(self) -> None: ...
    def clear(self) -> None: ...
    async def wait(self) -> Generator[None, None, Any]: ...

class ThreadSafeFlag(uio.IOBase):
    _flag: int
    def __init__(self) -> None: ...
    def ioctl(self, req, flags): ...
    def set(self) -> None: ...
    async def wait(self) -> Generator[Any, None, None]: ...
