40     Updates invalid caches. 
   41     One thread per timeline. 
   45         threading.Thread.__init__(self)
 
   55                 while len(self.
timeline.invalidated_caches) == 0:
 
   60                 total_topics = len(self.
timeline.topics)
 
   61                 update_step = max(1, total_topics / 100)
 
   66                     if topic 
in self.
timeline.invalidated_caches:
 
   67                         updated |= (self.
timeline._update_index_cache(topic) > 0)
 
   68                     if topic_num % update_step == 0 
or topic_num == total_topics:
 
   69                         new_progress = int(100.0 * (float(topic_num) / total_topics))
 
   70                         if new_progress != progress:
 
   71                             progress = new_progress
 
   73                                 self.
timeline.scene().background_progress = progress
 
   74                                 self.
timeline.scene().status_bar_changed_signal.emit()
 
   78                 self.
timeline.scene().background_progress = 0
 
   79                 self.
timeline.scene().status_bar_changed_signal.emit()