Main loop that usually never terminates.

def UpdateLoop(self):
    """Main loop that usually never terminates."""
    while not self.exit_now:
      with self.cv:
        while not self.to_process:
          self.cv.wait()
        next_update = self.to_process.popleft()
        if next_update is None:
          return

      now = time.time()
      next_cls = next_update[0]
      next_urn = next_update[1]
      next_time = next_update[2]
      while now < next_time and not self.exit_now:
        time.sleep(1)
        now = time.time()

      self.ProcessCollection(next_cls, next_urn)