Mark
11/01/2018, 12:22 PMproduce{}
for a finite sequence of items, the docs say to call SendChannel.close()
to indicate no more items will be sent. But isn’t the common case for no more items to be sent once produce
lambda has completed naturally? In which case, why is SendChannel.close()
not done automatically?Vsevolod Tolstopyatov [JB]
11/01/2018, 12:23 PMThe channel is [closed][SendChannel.close] when the coroutine completes.
Mark
11/01/2018, 12:24 PMMark
11/01/2018, 1:35 PMProducerCoroutine.onCompletionInternal()
implementation enforces this.Vsevolod Tolstopyatov [JB]
11/01/2018, 3:29 PMMark
11/01/2018, 3:50 PM