Comments (2)
Those nulls are internal affairs so unless you can exclude any class with that feature, no idea.
from rxjava.
Sure, thank you. With limited understanding of how Rx2 deals with fusion internally. After give this blog a read - my assumption is, Rx fusion library is adding null
in the stream in case of Asynchronous-fusion
Taking below para into consideration
In asynchronous-fusion mode, downstream has to still issue request() calls, but instead of enqueueing the value twice, the value gets generated into the shared queue and the upstream calls onNext() indicating its availability. The value of this call is irrelevant, we use null as a type-neutral value, and can trigger the usual drain() call directly.
I am wondering, if it's safe to assume not to call onNext
on downstream observers when Rx fusion code calls onNext(null), getting invoked via upstream observer.
Below is the basic code snippet implementation of otel code in kotlin which deals with fusion.
// downstream
internal class TracingObserver<T>(
private val wrappedObserver: Observer<in T>,
private val context: Context,
) : BasicFuseableObserver<T, T>(
wrappedObserver
) {
override fun onNext(t: T & Any) { // it throws exception when it gets called via fusion
context.makeCurrent().use { _ -> wrappedObserver.onNext(t) }
}
......
}
// upstream
internal class TracingSingleObserver<T>(
private val actual: SingleObserver<T>,
private val context: Context,
) : SingleObserver<T>, Disposable {
private var disposable: Disposable? = null
override fun onSubscribe(d: Disposable) {
if (!DisposableHelper.validate(disposable, d)) {
return
}
disposable = d
actual.onSubscribe(this)
}
override fun onSuccess(t: T & Any) {
context.makeCurrent().use { _ -> actual.onSuccess(t) } // upstream
}
....
}
I was wondering, if there are any implication, if i just handle the exception in TracingSingleObserver#onSuccess
which will invoke RxFusion with onNext(null)
but catches the exception thrown via TracingObserver#onNext
.
Can there be any implications if wrappedObserver.onNext(null)
isn't called in the RxStream.
Thanks, i need to dig in more!
from rxjava.
Related Issues (20)
- 3.x: SwitchMapInnerObserver.queue.offer NullPointerException HOT 2
- Link http://reactivex.io/RxJava/ generated by github pages not working HOT 1
- v3.1.4: race condition in DeferredScalarSubscription HOT 4
- v3: The marble diagram for cast is incredibly misleading.
- No Development on RxKotlin HOT 5
- missing PNG files in the documentation HOT 1
- 3.x: Items dropped by observeOn without backpressure errors HOT 2
- Consumer buffer of flowable leaks memory HOT 3
- UndeliverableException when use zip compose 2 observable , send Exceptions at same time in the two Observable 。 HOT 3
- 2.x: Infinity loop on subscription cancel HOT 6
- Weird Flowable behavior when flatMapCompletable is being executed in a different thread HOT 2
- Adopt the Scorecard Action to monitor the project's security posture
- `3.x` In README.md, add a link to the mentioned JavaFX Scheduler HOT 2
- Broken link in docs/Getting-Started.md
- Marble diagram for `Observable.concatMapMaybe` is wrong HOT 8
- repeatWhen terminate HOT 3
- What does it mean due to lack of requests in MissingBackpressureException HOT 2
- FlowableObserveOn.BaseObserveOnSubscriber will ignore the next datas when cosumer throw exception HOT 3
- Flowable.firstOrError interrupts the thread downstream. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxjava.