Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

3.x: Add fair mode overload to Schedulers.from(Executor)#6744

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
akarnokd merged 1 commit intoReactiveX:3.xfromakarnokd:FairExecutorScheduler
Dec 3, 2019

Conversation

@akarnokd
Copy link
Member

The defaultSchedulers.from implementation uses an eager approach to execute tasks on the underlyingExecutor which can lead to excessive thread occupation on its own, even if operators use buffering/prefetch of 1.

This PR introduces a new overload with a fairness option so that tasks are submitted to theExecutor in a non-overlapping and FIFO manner one by one.

In addition, the scheduler retention tests have been cleaned up and reworked to not wait unnecessarily long for the GC to finish.

Related:#6696,#6697

@akarnokdakarnokd added this to the3.0 milestoneDec 3, 2019
@codecov
Copy link

codecovbot commentedDec 3, 2019

Codecov Report

Merging#6744 into3.x willincrease coverage by<.01%.
The diff coverage is96%.

Impacted file tree graph

@@             Coverage Diff              @@##                3.x    #6744      +/-   ##============================================+ Coverage     98.12%   98.13%   +<.01%  Complexity     6189     6189              ============================================  Files           677      677                Lines         44663    44683      +20       Branches       6171     6176       +5     ============================================+ Hits          43825    43849      +24- Misses          299      301       +2+ Partials        539      533       -6
Impacted FilesCoverage ΔComplexity Δ
...va/io/reactivex/rxjava3/schedulers/Schedulers.java100% <100%> (ø)12 <3> (+1)⬆️
...rxjava3/internal/schedulers/ExecutorScheduler.java95.89% <95.45%> (-1.11%)10 <2> (ø)
...perators/single/SingleFlatMapIterableFlowable.java94.16% <0%> (-2.5%)2% <0%> (ø)
...eactivex/rxjava3/processors/BehaviorProcessor.java96.58% <0%> (-2.44%)51% <0%> (ø)
...tivex/rxjava3/disposables/CompositeDisposable.java98.14% <0%> (-1.86%)39% <0%> (-1%)
...l/operators/observable/ObservableFlatMapMaybe.java90.84% <0%> (-1.41%)2% <0%> (ø)
...ternal/operators/completable/CompletableMerge.java95.94% <0%> (-1.36%)2% <0%> (ø)
...a3/internal/operators/flowable/FlowableCreate.java96.76% <0%> (-1.3%)6% <0%> (ø)
...nternal/operators/observable/ObservableCreate.java97.43% <0%> (-0.86%)2% <0%> (ø)
... and13 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update445def8...91f4dd4. Read thecomment docs.

@akarnokdakarnokd merged commit292dc62 intoReactiveX:3.xDec 3, 2019
@akarnokdakarnokd deleted the FairExecutorScheduler branchDecember 3, 2019 16:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@vanniktechvanniktechvanniktech approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.0

Development

Successfully merging this pull request may close these issues.

2 participants

@akarnokd@vanniktech

[8]ページ先頭

©2009-2025 Movatter.jp