en

Mark Murphy

Buku audio

Kutipan

b4777467766membuat kutipan2 tahun yang lalu
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.
b4777467766membuat kutipan2 tahun yang lalu
each Flow created by flow() can only be collected once — we cannot have multiple collectors.

These are fairly severe limitations.
b4777467766membuat kutipan2 tahun yang lalu
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
Seret dan letakkan file Anda (maksimal 5 sekaligus)