!str #16492 Remove closure in TickSource to make it shareable

This commit is contained in:
Patrik Nordwall 2015-01-26 14:16:57 +01:00
parent af4555ce1f
commit 631b4ca5ac
8 changed files with 37 additions and 60 deletions

View file

@ -48,10 +48,10 @@ class StreamBuffersRateSpec extends AkkaSpec {
val zipper = ZipWith[Tick, Int, Int]((tick, count) => count)
Source(initialDelay = 1.second, interval = 1.second, () => "message!")
Source(initialDelay = 1.second, interval = 1.second, "message!")
.conflate(seed = (_) => 1)((count, _) => count + 1) ~> zipper.right
Source(initialDelay = 3.second, interval = 3.second, () => Tick()) ~> zipper.left
Source(initialDelay = 3.second, interval = 3.second, Tick()) ~> zipper.left
zipper.out ~> Sink.foreach(println)
}