https://kotlinlang.org logo
Title
b

bj0

07/04/2019, 1:07 AM
AS says
Channel operators are deprecated in favour of Flow and will be removed in 1.4
But if my channel source is hot (network traffic), how/where should I introduce Flow? The articles I've read so far make the distinction between hot and cold data streams and claim Flow is for cold streams
g

gildor

07/04/2019, 1:48 AM
Operators on channels are not efficient (each of them create intermediate Channel), if you need operators better to use Flow, just use flow interface to access your hot stream
b

bj0

07/04/2019, 5:23 PM
how do you switch from a channel to a flow? just use
channel.consume
inside
flow{}
?
g

gildor

07/04/2019, 11:28 PM
channel.asFlow()