Most discussion is on Typelevel Discord: https://discord.gg/bSQBZA3Ced
s.concurrently(SoS.join)
is not onerous syntactically
SoS
that you then throw away
join
without allocating all the queues
I'm just saying that you can't solve this:
def a = Stream(streamA1.drain, streamA2.drain).join
def b = Stream(streamB1.drain, streamB2.drain).join
def c = Stream(a.drain, b.drain).join
you can reduce the initial cost of join
, but you can't make the above be the same as
def c = Stream(streamA1.drain, streamA2.drain, streamB1.drain, streamB2.drain).join
unless you make join
cost 0 (allocate no new primitives per join
)
joinDrain
or something can be useful to reduce the cost of a single join in the first place, given the very common use case of just concurrently running things for their effect