ursus
11/13/2018, 4:29 AMgildor
11/13/2018, 4:43 AMursus
11/13/2018, 4:46 AMgildor
11/13/2018, 4:48 AMursus
11/13/2018, 4:51 AMgildor
11/13/2018, 4:52 AMursus
11/13/2018, 4:52 AMgildor
11/13/2018, 4:57 AMursus
11/13/2018, 4:57 AM.subscribe(new SerializedObserver<>(new Observer<Activation>() {
@Override public void onSubscribe(Disposable d) {
}
@Override public void onNext(Activation activation) {
}
@Override public void onError(Throwable e) {
}
@Override public void onComplete() {
}
}));
gildor
11/13/2018, 4:57 AMursus
11/13/2018, 4:57 AMgildor
11/13/2018, 4:58 AMursus
11/13/2018, 5:00 AMqueuedProcessActionRelay
.observeOn(scheduler)
.mergeWith(directProcessActionRelay)
.throwingSubscribe {
synchronized(this) {
stateMachine2.process(it)
}
}
kioba
11/13/2018, 12:30 PMqueuedProcessActionRelay
.mergeWith(directProcessActionRelay)
.flatmap {
stateMachineObserver.processOnSubscribe(it)
.subscribeOn(synchronizedScheduler)
}.subscribe()
stateMachineObserver
just wraps the stateMachine and runs it when subscription happens, You also could check which Scheduler you are running onursus
11/13/2018, 1:39 PMkioba
11/13/2018, 1:44 PMdirectProcessActionRelay
into the flatmap as well.
synchronized scheduler is only a scheduler where all your state machine code will run