Class SerializedSubscriber<T>

java.lang.Object
io.reactivex.rxjava4.subscribers.SerializedSubscriber<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
FlowableSubscriber<T>, Flow.Subscriber<T>, Flow.Subscription

public final class SerializedSubscriber<T> extends Object implements FlowableSubscriber<T>, Flow.Subscription
Serializes access to the Flow.Subscriber.onNext(Object), Flow.Subscriber.onError(Throwable) and Flow.Subscriber.onComplete() methods of another Flow.Subscriber.

Note that onSubscribe(Subscription) is not serialized in respect of the other methods so make sure the onSubscribe is called with a non-null Flow.Subscription before any of the other methods are called.

The implementation assumes that the actual Subscriber's methods don't throw.