import typing
import weakref

def get_thread_name(thread_id: int) -> str: ...
def get_thread_native_id(thread_id: int) -> int: ...

_T = typing.TypeVar("_T")

class _ThreadLink(typing.Generic[_T]):
    def link_object(self, obj: _T) -> None: ...
    def clear_threads(self, existing_thread_ids: typing.Set[int]) -> None: ...
    def get_object(self, thread_id: int) -> typing.Optional[_T]: ...
