elizarov
03/11/2017, 5:44 PMproduce
builder is not designed for callback-bridging. It closes the channel as soon as the block in the produce completes. So, if you produce(context) { send(1); send(2) }
, then you get a channel with 1
, then 2
, then it is closed.