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 newtype for Task.Par, using same encoding used in cats-effect #545

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

Avasil
Copy link
Collaborator

@Avasil Avasil commented Jan 18, 2018

Closes #538

@codecov
Copy link

codecov bot commented Jan 18, 2018

Codecov Report

Merging #545 into master will increase coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #545      +/-   ##
==========================================
+ Coverage   90.43%   90.47%   +0.04%     
==========================================
  Files         366      366              
  Lines        9632     9632              
  Branches     1793     1794       +1     
==========================================
+ Hits         8711     8715       +4     
+ Misses        921      917       -4

@alexandru
Copy link
Member

Looks good 👍

@@ -29,6 +30,8 @@ import scala.concurrent.Promise
* use of Task's `runAsync(callback)`.
*/
object TypeClassLawsForTaskWithCallbackSuite extends BaseLawsSuite {
implicit val ap: Applicative[Task.Par] = CatsParallelForTask.applicative
Copy link
Member

Choose a reason for hiding this comment

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

Ah, wait — so here we need a special equality defined for Task.Par, just like we have for Task. The purpose of this test suite is to test task's run-loop by using the runAsync(callback) method, instead of the normal runAsync: CancelableFuture that we are using in these tests.

Copy link
Member

@alexandru alexandru left a comment

Choose a reason for hiding this comment

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

See my comment on TypeClassLawsForTaskWithCallbackSuite

@alexandru
Copy link
Member

Looking good @Avasil, merging.

@alexandru alexandru merged commit 5f34116 into monix:master Jan 18, 2018
@Avasil Avasil deleted the task#parallel branch January 21, 2018 18:44
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.

2 participants