Re: Aw: [akka-user] Akka 2.5.11 - materialization of Flow.lazyInit

2018-03-05 Thread Konrad “ktoso” Malawski
To reply about: > I think the two methods Source.lazily and Flow.lazyInit should be alligned (in their name and in their materialized values) No, those are different things and should not be name-aligned. The lazyInit wording is used to talk about “on first element”, while we use the lazily to

Re: Aw: [akka-user] Akka 2.5.11 - materialization of Flow.lazyInit

2018-03-05 Thread Konrad “ktoso” Malawski
Whoa (!), thanks for the great catch. You are absolutely right that the Flow.lazyInit is incorrect. It is not possible to get the M strictly from the Future[M] after all. I skimmed tests and they seem to not verify this; The Sink version is fine, so at least that. Could you log a bug about this

Aw: [akka-user] Akka 2.5.11 - materialization of Flow.lazyInit

2018-03-05 Thread Stefan Wachter
I just saw that Source.lazily implements a similar concept:   def lazily[T, M](create: () ⇒ Source[T , M]): Source[T, Future[M]]   Here a the materialized value is a Future that is failed if there was no demand before the source gets never created.   I think the two methods Source.lazily