1.x: fix reset() shutting down everything other than the schedulers by akarnokd · Pull Request #3996 · ReactiveX/RxJava · GitHub
Skip to content

1.x: fix reset() shutting down everything other than the schedulers#3996

Merged
akarnokd merged 1 commit into
ReactiveX:1.xfrom
akarnokd:Lifecyclefix
Jun 7, 2016
Merged

1.x: fix reset() shutting down everything other than the schedulers#3996
akarnokd merged 1 commit into
ReactiveX:1.xfrom
akarnokd:Lifecyclefix

Conversation

@akarnokd

@akarnokd akarnokd commented Jun 7, 2016

Copy link
Copy Markdown
Member

The reset shut down all the main schedulers and the helper pools, causing the failure in #3993 .

@hzsweers, you were right with the need for the instance-shutdown method.

@akarnokd akarnokd added the Bug label Jun 7, 2016

@ZacSweers ZacSweers Jun 7, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not make these private?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to avoid too much private modifiers; generally it adds hidden bridge methods, increasing the method count which is bad for Android. Also package level access leaves it open to same-package unit testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, though this case wouldn't generate synthetic accessors I don't think.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, bridges are not in play here; it has become a second nature of me scoping as package-private.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad approach :). LGTM then

@ZacSweers

Copy link
Copy Markdown
Contributor

Minor nit, rest of the code looks good 👍

Nice catch, sorry for the inadvertent bug and glad it was a relatively simple fix

@artem-zinnatullin

Copy link
Copy Markdown
Contributor

👍

1 similar comment
@stevegury

Copy link
Copy Markdown
Member

@akarnokd akarnokd merged commit 08a2130 into ReactiveX:1.x Jun 7, 2016
@akarnokd akarnokd deleted the Lifecyclefix branch June 7, 2016 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants