Any previous usage can be represented in this fashion while typically
saving one function allocation and also saving the function literal’s
syntax overhead (for the seed). Plus a new feature: the provided
iterator does not have to be infinite, limiting how far expand is
allowed to go.
Generatively attempts to verify that it behaves exactly like the
collections library
Removes the use of Vector.builder for an easier-to-follow Vector
implementation while waiting for this to be reimplemented as a
GraphStage.
Also, the Builder implementation relies on undefined behavior:
"Builder.result() — Produces a collection from the added elements.
The builder's contents are undefined after this operation." -
http://www.scala-lang.org/api/current/#scala.collection.mutable.Builder
main work by @drewhk with contributions from @2m and @rkuhn
This work uncovered many well-hidden bugs in existing Stages, in
particular StatefulStage. These were hidden by the behavior of
OneBoundedInterpreter that normally behaves more orderly than it
guarantees in general, especially with respect to the timeliness of
delivery of upstream termination signals; the bugs were then that
internal state was not flushed when onComplete arrived “too early”.
- replace all occurrences with equivalent GraphStage implementations
This commit introduces a mini-DSL for GraphStage that allows emitting or
reading multiple elements to/from a port with one statement, installing
stateful handlers on the port to make it work. The emitting side allows
stacked continuations, meaning that while an emit() is ongoing (waiting
for demand) another one can be added to the queue; this allows
convenient formualation of merge-type stages.
+ with javadsl
+ allows configuring log levels
+ allows turning off logging of certain actions completely
+ cookbook adjusted to show this instead of manual PushStage
- PENDING: preStart based impl will be faster, coming soon