Merge pull request #18647 from akka/wip-17827-alsoTo-√
=str - #17827 - Introduces operator for Sources and Flows, to attach…
This commit is contained in:
commit
92e2ac21f0
7 changed files with 114 additions and 21 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue