Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix AndroidSchedulers to create an instance using hook only once.
Previously we were asking the hook for an instance every time `mainThread()` was called. This not only impacted performance, but also broke the contract the that hook was a factory–instead requiring that it behave like a thread-safe, lazily-initialized instance cache. If for whatever reason you do need to change the instance over time, return a scheduler instance which delegates to another and allows swapping out the delegate.
- Loading branch information