Merge pull request #18647 from akka/wip-17827-alsoTo-√

=str - #17827 - Introduces  operator for Sources and Flows, to attach…
This commit is contained in:
Viktor Klang (√) 2015-10-09 21:06:57 +02:00
commit 92e2ac21f0
7 changed files with 114 additions and 21 deletions

View file

@ -136,6 +136,11 @@ class FlowDocSpec extends AkkaSpec {
val sink: Sink[Int, Unit] = Flow[Int].map(_ * 2).to(Sink.foreach(println(_)))
Source(1 to 6).to(sink)
// Broadcast to a sink inline
val otherSink: Sink[Int, Unit] =
Flow[Int].alsoTo(Sink.foreach(println(_))).to(Sink.ignore)
Source(1 to 6).to(otherSink)
//#flow-connecting
}