parameters: (self)
docstring: Start a while/true loop in the background for automatic invalidation of
          the UI.
docstring_summary: Start a while/true loop in the background for automatic invalidation of
          the UI.
docstring_tokens: Start a while / true loop in the background for automatic invalidation of the UI .
function: def _start_auto_refresh_task(self) -> None:
          """
          Start a while/true loop in the background for automatic invalidation of
          the UI.
          """
          if self.refresh_interval is not None and self.refresh_interval != 0:
  
              async def auto_refresh(refresh_interval: float) -> None:
                  while True:
                      await sleep(refresh_interval)
                      self.invalidate()
  
              self.create_background_task(auto_refresh(self.refresh_interval))
function_tokens: def _start_auto_refresh_task ( self ) -> None : if self . refresh_interval is not None and self . refresh_interval != 0 : async def auto_refresh ( refresh_interval : float ) -> None : while True : await sleep ( refresh_interval ) self . invalidate ( ) self . create_background_task ( auto_refresh ( self . refresh_interval ) )