parameters: (self)
docstring: Initialize the flush thread.
docstring_summary: Initialize the flush thread.
docstring_tokens: Initialize the flush thread .
function: def __init__(self):
          """Initialize the flush thread."""
  
          threading.Thread.__init__(self, name="FlushThread")
          # Do not wait to flush the logs if interrupted by the user.
          self.daemon = True
  
          def interruptible_sleep(secs):
              """Wait up to 'secs' seconds or for the 'self.__schedule_updated' event to be set."""
  
              # Setting 'self.__schedule_updated' in submit() will cause the scheduler to return early
              # from its 'delayfunc'. This makes it so that if a new event is scheduled with
              # delay=0.0, then it will be performed immediately.
              self.__schedule_updated.wait(secs)
              self.__schedule_updated.clear()
  
          self.__scheduler = scheduler.Scheduler(time.monotonic, interruptible_sleep)
          self.__schedule_updated = threading.Event()
          self.__should_stop = threading.Event()
          self.__terminated = threading.Event()
function_tokens: def __init__ ( self ) : threading . Thread . __init__ ( self , name = "FlushThread" ) # Do not wait to flush the logs if interrupted by the user. self . daemon = True def interruptible_sleep ( secs ) : """Wait up to 'secs' seconds or for the 'self.__schedule_updated' event to be set.""" # Setting 'self.__schedule_updated' in submit() will cause the scheduler to return early # from its 'delayfunc'. This makes it so that if a new event is scheduled with # delay=0.0, then it will be performed immediately. self . __schedule_updated . wait ( secs ) self . __schedule_updated . clear ( ) self . __scheduler = scheduler . Scheduler ( time . monotonic , interruptible_sleep ) self . __schedule_updated = threading . Event ( ) self . __should_stop = threading . Event ( ) self . __terminated = threading . Event ( )