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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 5 Aug 2019 19:10:13 +0000 (15:10 -0400)
commitc1859f693ac2a28d96e7ad492f8d66f74f33686f
tree37f9c4776ac44c58750199989945cb27f767f4e7
parent8cc0e6eacdc050f30629b99a5c9d2dc4ba4513c3
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.025792 seconds and 4 git commands to generate.