class_docstr: A task runner that runs an asyncio event loop on a background thread.
class_docstr_tok: ["A","task","runner","that","runs","an","asyncio","event","loop","on","a","background","thread","."]
code: def __init__(self) -> None:
      self.__io_loop: asyncio.AbstractEventLoop | None = None
      self.__runner_thread: threading.Thread | None = None
      self.__lock = threading.Lock()
      atexit.register(self._close)
  
imports: from __future__ import annotations
  import asyncio
  import atexit
  import errno
  import inspect
  import sys
  import threading
  import warnings
  from pathlib import Path
  from types import FrameType
  from typing import Any, Awaitable, Callable, TypeVar, cast
label_desc: Use image node_id 1 to create a new _TaskRunner object  with example: obj = _TaskRunner()