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

Replace Configuration.ParallelOptions with Configuration.MaxDegreeOfParallelism #667

Merged
merged 2 commits into from Aug 5, 2018

Conversation

antonfirsov
Copy link
Member

@antonfirsov antonfirsov commented Aug 5, 2018

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #651.
Internal helpers ParallelFor.WithConfiguration(...) and ParallelFor.WithTemporaryBuffer<T>(...) are utilized more heavily.

Copy link
Member

@tocsoft tocsoft left a comment

Choose a reason for hiding this comment

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

👍 looking good

Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

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

LGTM though could you check that min value?

get => this.maxDegreeOfParallelism;
set
{
if (value <= 0)
Copy link
Member

Choose a reason for hiding this comment

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

Should this min value be 1?

Copy link
Member

Choose a reason for hiding this comment

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

value <=0 means it has to be > 0

Copy link
Member Author

Choose a reason for hiding this comment

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

Zero is an exclusive minimum here, if (value <= 1) would mean that we throw for MaxDegreeOfParallelism = 1 which is allowed!

Copy link
Member

Choose a reason for hiding this comment

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

I'm pleading still jetlagged

@codecov
Copy link

codecov bot commented Aug 5, 2018

Codecov Report

Merging #667 into master will decrease coverage by 0.12%.
The diff coverage is 97.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #667      +/-   ##
==========================================
- Coverage   89.79%   89.67%   -0.13%     
==========================================
  Files         889      890       +1     
  Lines       37614    37633      +19     
  Branches     2468     2472       +4     
==========================================
- Hits        33777    33747      -30     
- Misses       3133     3182      +49     
  Partials      704      704
Impacted Files Coverage Δ
...rocessors/Binarization/BinaryThresholdProcessor.cs 100% <100%> (ø) ⬆️
...rocessors/Convolution/Convolution2PassProcessor.cs 100% <100%> (ø) ⬆️
...Sharp/Common/Extensions/ConfigurationExtensions.cs 100% <100%> (ø)
...p/Processing/Processors/Filters/FilterProcessor.cs 100% <100%> (ø) ⬆️
.../Processing/Processors/Transforms/FlipProcessor.cs 100% <100%> (ø) ⬆️
...cessing/Processors/Effects/OilPaintingProcessor.cs 97.67% <100%> (ø) ⬆️
...Processing/Processors/Effects/PixelateProcessor.cs 96.77% <100%> (ø) ⬆️
...ests/ImageSharp.Tests/Drawing/SolidPolygonTests.cs 100% <100%> (ø) ⬆️
...rp/Processing/Processors/Overlays/GlowProcessor.cs 93.1% <100%> (-0.23%) ⬇️
...rocessing/Processors/Overlays/VignetteProcessor.cs 100% <100%> (ø) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67b2e83...a8c44f9. Read the comment docs.

@antonfirsov antonfirsov merged commit d874ee7 into master Aug 5, 2018
@antonfirsov antonfirsov deleted the af/drop-paralleloptions branch October 6, 2018 15:08
antonfirsov added a commit to antonfirsov/ImageSharp that referenced this pull request Nov 11, 2019
Replace Configuration.ParallelOptions with Configuration.MaxDegreeOfParallelism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants