Jonathan
03/15/2018, 2:33 PMConsumable<E>.first()
for the Consumable
interface you propose? https://github.com/Kotlin/kotlinx.coroutines/pull/274#issuecomment-373393257elizarov
03/15/2018, 3:27 PMconsumeEach { ... }
and you don’t need any more items you just do throw CancellationException
(or some shared instance there of). That way you cancel the upstream producer.Jonathan
03/15/2018, 4:57 PM