flow() creates a cold Flow. Nothing happens until something starts collecting the output of the Flow — in this case, the collect() call in main(). The events only exist if something is collecting them.
b4777467766je citiralaprije 2 godine
each Flow created by flow() can only be collected once — we cannot have multiple collectors.
These are fairly severe limitations.
b4777467766je citiralaprije 2 godine
SharedFlow is a hot flow that can have multiple consumers, with each consumer seeing the same sequence of emitted events as any other active consumer at the time.
fb2epub
Povucite i ispustite datoteke
(ne više od 5 odjednom)