Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Task Applicative instance doesn't run the tasks in parallel #193
Combining 2 tasks using monix-cat's applicative instance, results in sequential (monadic) execution of those tasks, as opposed to parallel execution which is what you would expect from an applicative.
The result I get for a sample run is:
(Task2 only starts once Task1 has finished)
See the full code example here.
If I implement an Applicative instance using
See the full code example with this custom applicative instance here.
@mmollaverdi @dialelo so normally all you have to do is:
Unfortunately there's a problem for Cats. That applicative builder is using
I committed a patch that also overrides
@mmollaverdi are you sure?
There is a test that ensures the tasks are executed in parallel when using
Also, after running your sample, along with the required import, I got this output:
That seems to be running in parallel to me.
Do note that