Jonathan
03/15/2018, 2:33 PMConsumable<E>.first()
for the Consumable
interface you propose? https://github.com/Kotlin/kotlinx.coroutines/pull/274#issuecomment-373393257Jonathan
03/15/2018, 2:34 PMelizarov
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.elizarov
03/15/2018, 3:31 PMJonathan
03/15/2018, 4:57 PM