-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.x: add optional tracking of worker creation sites + report it on error #3965
Conversation
317824d
to
c78f3bc
Compare
* the License. | ||
*/ | ||
|
||
package rx.internal.schedulers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to public rx.schedulers
and mark as @Experimental
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to expose this, there is the Schedulers.setWorkerTracking
. Plus, this way it can be an enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, got it.
I see potential problem with this solution: if I jump between threads in the Rx chain it looks like I'll loose stacktrace of Observable
.just(value)
.observeOn(scheduler1)
.map(funcA())
.observeOn(scheduler2)
.map(funcB())
.subscribe() If exception happens in Looks like we need to have |
What you are describing is value-origin tracking, not what this and #3937: if a scheduled task crashes, show where the worker has been created, possibly pointing to the assembly site of the sequence. |
Then this solution won't cover major percentage of cases when chain jumps between threads and then unexpected exception happens. For now I vote for keeping initial stacktrace through threads, so 👎, sorry. |
The |
This is an alternative to #3937 to capture worker creation sites for
computation
,io
andnewThread
schedulers.