39 Waits for a new playhead position on the given topic, then loads the message at that position and notifies the view threads. 41 One thread per topic. Maintains a cache of recently loaded messages. 45 threading.Thread.__init__(self)
67 cv = self.timeline._playhead_positions_cvs[self.
topic]
73 bag, playhead_position = self.timeline._playhead_positions[self.
topic]
78 if not self.timeline.has_listeners(self.
topic):
82 if playhead_position
is None:
88 messages_cv = self.timeline._messages_cvs[self.
topic]
90 self.timeline._messages[self.
topic] = (bag, msg_data)
91 messages_cv.notify_all()
94 key =
'%s%s' % (bag.filename, str(position))
98 msg_data = self.timeline.read_message(bag, position)
101 self._message_cache_keys.append(key)
106 self._message_cache_keys.remove(oldest_key)
112 cv = self.timeline._playhead_positions_cvs[self.
topic]
def __init__(self, timeline, topic)
def _get_message(self, bag, position)