I opened https://github.com/akka/akka/issues/23044 a while ago to track the 
in my opinion surprising behaviour of concat doing an eager pull on the 
second input. As everything is fused by default nowadays, and you can add 
detach yourself, but you cannot remove detach when it's there, I think we 
should change the stage by removing the detach.

On Wednesday, October 25, 2017 at 12:01:41 PM UTC+2, Christopher Hunt wrote:
>
> Hey community,
>
> I've got a situation where there's a promise that, when completed, I'd 
> like to concat its value onto the *end* of any stream elements before it 
> i.e.:
>
> someSource.concat(Source.fromFuture(somePromise.future))
>
> What I'm noticing is that if the promise is completed then the promised 
> value doesn't wait for someSource to complete. Rather, it yields an element 
> near to the time that the promise was completed, seemingly ignoring any 
> further elements from someSource.
>
> This problem appears to be similar to 
> https://github.com/akka/akka/issues/22042, where flatMapConcat is 
> recommended. However, I'm not sure that flatMapConcat as its contract 
> appears to be different - I only want to concat elements when someSource is 
> complete. flatMapConcat appears to get called for each element from 
> someSource.
>
> Any further pointers in order to achieve the API description of concat in 
> conjunction with Source.fromFuture?
>
> Cheers,
> -C
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to