Skip to content
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: allow customizing GenericScheduledExecutorService via RxJavaHooks #4173

Merged
merged 3 commits into from
Jul 10, 2016

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Jul 7, 2016

This PR adds a customization point to RxJavaHooks that let's one create different ScheduledExecutorService instances for the GenericScheduledExecutorService utility.

To apply the hook (or remove it), one has to restart the Schedulers via shutdown() and then start(). Note that the latter had to be made public as well.

Related #4171.

@codecov-io
Copy link

codecov-io commented Jul 7, 2016

Current coverage is 84.08%

Merging #4173 into 1.x will increase coverage by 0.51%

@@                1.x      #4173   diff @@
==========================================
  Files           262        263     +1   
  Lines         17048      17057     +9   
  Methods           0          0          
  Messages          0          0          
  Branches       2574       2574          
==========================================
+ Hits          14247      14342    +95   
+ Misses         1938       1872    -66   
+ Partials        863        843    -20   

Powered by Codecov. Last updated by cf154b1...4064799

@akarnokd
Copy link
Member Author

akarnokd commented Jul 8, 2016

RxJavaHooks.setOnGenericScheduledExecutorService(null);

Schedulers.shutdown();
// start() is package private so had to move this test here
Copy link
Contributor

Choose a reason for hiding this comment

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

not valid

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, will clean it in the next coverage test PR.

@artem-zinnatullin
Copy link
Contributor

👍

@akarnokd
Copy link
Member Author

akarnokd commented Jul 9, 2016

I'll have to redo this once #4182 is merged so please don't merge yet.

@akarnokd akarnokd force-pushed the RxJavaHookGenericSvc branch from 23a8479 to 021d34d Compare July 9, 2016 20:28
@akarnokd
Copy link
Member Author

akarnokd commented Jul 9, 2016

Rebased.

@akarnokd akarnokd merged commit 91eeea0 into ReactiveX:1.x Jul 10, 2016
@akarnokd akarnokd deleted the RxJavaHookGenericSvc branch July 10, 2016 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants