bt2: make `TraceCollectionMessageIterator` not use an output port msg iter
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sun, 4 Aug 2019 05:13:15 +0000 (01:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Aug 2019 18:05:21 +0000 (14:05 -0400)
commitc535b26d3ca159fba906b608586b4abd84d0dfc7
tree79590aa84831dc438ef17b2cd4058e89a829a694
parent22b4de6afe2916a5346026b2876301b730530125
bt2: make `TraceCollectionMessageIterator` not use an output port msg iter

Because there's a plan to drop the output port message iterator concept
altogether, make `TraceCollectionMessageIterator` not use any output
port message iterator.

Instead, a `TraceCollectionMessageIterator` instance adds a proxy sink
component (`_TraceCollectionMessageIteratorProxySink`) to its graph,
connecting it to the last filter component in the chain, and sharing
with it a list having a single item.

When the sink consumes a message from its upstream message iterator, it
places it in the shared list as the first item.
TraceCollectionMessageIterator.__next__() is changed so that it calls
Graph.run_once() to make the proxy sink consume, and then reads the
consumed message from the shared list.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I4b561837a9c23d3d758ea089193cfdabf99fc27e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1820
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/trace_collection_message_iterator.py
This page took 0.024448 seconds and 4 git commands to generate.