It would be confusing to have code that looks like:
Copy code
channelFlow(buffer = UNLIMITED) {
…
}.conflate()
Because the two buffer specifications would compete (since the operators are fused under the hood and use a single channel), and only one of the specifications would actually be used.
k
kevin.cianfarini
02/10/2020, 4:03 PM
The missing piece I had was that operators are fused.
kevin.cianfarini
02/10/2020, 4:03 PM
knowing that solves this question
kevin.cianfarini
02/10/2020, 4:04 PM
here's the bit in question
Copy code
return if (this is ChannelFlow)
update(capacity = capacity)
else
ChannelFlowOperatorImpl(this, capacity = capacity)
👍 1
kevin.cianfarini
02/10/2020, 4:05 PM
and from the docs for anyone who reads this later
Adjacent applications of channelFlow, flowOn, buffer, produceIn, and broadcastIn are always fused so that only one properly configured channel is used for execution.