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

Add IO implementation of parMap #950

Merged
merged 27 commits into from Jul 24, 2018
Merged

Add IO implementation of parMap #950

merged 27 commits into from Jul 24, 2018

Conversation

pakoito
Copy link
Member

@pakoito pakoito commented Jul 22, 2018

First pass at parallelising IO.

TODO:

  • Nice API
  • Tests
  • Docs

@pakoito pakoito requested a review from raulraja July 22, 2018 16:48
@codecov
Copy link

codecov bot commented Jul 22, 2018

Codecov Report

Merging #950 into master will increase coverage by 0.37%.
The diff coverage is 67.92%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #950      +/-   ##
============================================
+ Coverage     46.21%   46.59%   +0.37%     
- Complexity      642      643       +1     
============================================
  Files           304      306       +2     
  Lines          7859     7965     +106     
  Branches        806      816      +10     
============================================
+ Hits           3632     3711      +79     
- Misses         3906     3927      +21     
- Partials        321      327       +6
Impacted Files Coverage Δ Complexity Δ
.../arrow-effects/src/main/kotlin/arrow/effects/IO.kt 70% <100%> (+3.89%) 8 <0> (ø) ⬇️
...ffects/src/main/kotlin/arrow/effects/IOParallel.kt 20.68% <20.68%> (ø) 0 <0> (?)
...ain/kotlin/arrow/effects/internal/ParallelUtils.kt 85.52% <85.52%> (ø) 0 <0> (?)
...effects/src/main/kotlin/arrow/effects/IORunLoop.kt 73.36% <0%> (+1.08%) 43% <0%> (+1%) ⬆️
...fects/src/main/kotlin/arrow/effects/IOInstances.kt 50% <0%> (+4.16%) 0% <0%> (ø) ⬇️
...ts/src/main/kotlin/arrow/effects/internal/Utils.kt 80% <0%> (+8%) 0% <0%> (ø) ⬇️

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 947484e...0814e8f. Read the comment docs.

@pakoito
Copy link
Member Author

pakoito commented Jul 22, 2018

@raulraja I'm happy to merge without docs for now, to validate our assumptions of how it should work and announce it later.

@raulraja
Copy link
Member

Looks great, awesome work!. Instead of creating the arities for mapN in the companion shouldn't these be in the type classes and exported with the work Eugenio is doing for type class extension generation?

@pakoito
Copy link
Member Author

pakoito commented Jul 22, 2018

@raulraja It's IO-exclusive for now, it isn't generalised to run for any Effect because it uses unsafeRunAsync().

@pakoito
Copy link
Member Author

pakoito commented Jul 24, 2018

@raulraja I've generalised for Effect, although it's a bit ugly because we don't have a nice Future box where to put the "starters" in.

@pakoito pakoito merged commit 18f2d13 into master Jul 24, 2018
@pakoito pakoito deleted the paco-pario branch July 24, 2018 17:31
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

2 participants