I want to know cases in which we need to "serialize" observable, its necessary. I mean cases in which "onNext" method will get called concurrently instead of one after another.
Originally, serialize()
was introduced to fix some badly behaving custom Observable
s from the consumer's end instead of making the author fix his create()
-ion in 1.x. As the enforcing of the Observable
protocol became more prominent, there was less need for the operator in practice. It still ended up in v2 just in case and for "nostalgic reasons". Note that its sibling, Subject.toSerialized()
is completely legitimate and is there to serialize access to a Subject
in case it is driven from multiple threads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With