code: def run():
          
          while NonBlockingStreamReader._run_flag:
              # Wait for streams to appear
              if not NonBlockingStreamReader._streams:
                  time.sleep(0.2)
                  continue
              # Try to get correct select/poll method for this OS
              # Try if select.poll() is supported (Linux/UNIX)
              try:
                  poll = select.poll()
              except AttributeError:
                  pass
              else:
                  NonBlockingStreamReader._read_select_poll(poll)
                  del poll
                  continue
              # Try is select.kqueue is supported (BSD/OS X)
              try:
                  k_queue = select.kqueue()  # pylint: disable=no-member
              except AttributeError:
                  pass
              else:
                  NonBlockingStreamReader._read_select_kqueue(k_queue)
                  k_queue.close()
                  continue
              # Not workable polling method found
              raise RuntimeError('This OS is not supporting select.poll() or select.kqueue()')
docs: Run loop