Let me try to help. Consider this code: ``` val ch...
# coroutines
e
Let me try to help. Consider this code:
Copy code
val channel = produce(context, capacity=2) { send(1); send(2); /* implicit close() on exit */ }
for (x in channel) println(x) // should print 1 & 2 even if producer had already finished!