14 """Helpful utilities related to the stream module."""
22 _LOGGER = logging.getLogger(__name__)
26 """A stream.Consumer that passes a transformation of its input to another."""
28 def __init__(self, transformation, downstream):
43 """A Consumer that when iterated over emits the values it has consumed."""
85 """A Consumer decorator that affords serialization and asynchrony."""
97 def _spin(self, sink, value, terminate):
100 if value
is _NO_VALUE:
103 sink.consume_and_terminate(value)
106 except Exception
as e: