-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Labels
Description
RxJava in not nice when it comes to stacktraces.
The worst thing is observeOn
that schedules execution on different threads. Every time we use observeOn
we get our stacktrace from the process root, all the call history gets erased.
The idea is to make schedulers save the caller's stack, wrap action calls and attach the stacktrace to each exception that has been thrown by scheduled actions.
Pros:
traceable exceptions
Cons:
Performance cost
Leaks because of recursion
I think that we can have Schedulers.io(boolean trace)
alternative that will save the stacktrace, so we could call it Schedules.io(DEBUG)
to turn stacktracing off on production for performance critical parts.
How do you guys find this idea?
dr-projectiro, onelaview and RikkiGibson