Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Revert parTupledN and parMapN derivation #249

Merged
merged 6 commits into from
Aug 21, 2020

Conversation

nomisRev
Copy link
Member

Currently parMapN is derived from parTupledN meaning that for parMapN you always do a redundant allocation, this was originally due to how we derived Applicative functions. So this also reduces parTraverse with n allocation for a list of size n.

Additionally, we always deal with tupled functions in parMapN that forces users to always destructure. Additionally, it disallows us to use method references in a convenient way. reference

Copy link
Member

@aballano aballano left a comment

Choose a reason for hiding this comment

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

👌

Copy link
Contributor

@danimontoya danimontoya left a comment

Choose a reason for hiding this comment

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

Great @nomisRev ! 🙌

Copy link
Member

@i-walker i-walker left a comment

Choose a reason for hiding this comment

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

👍

@rachelcarmena
Copy link
Member

Re-running build integration check after:

2020-08-21T12:44:23.1625080Z > Task :arrow-fx-coroutines:test
2020-08-21T12:44:23.1625140Z 
2020-08-21T12:44:23.1625240Z arrow.fx.coroutines.stream.CancellationTest > parJoin FAILED
2020-08-21T12:44:23.1625340Z     TimeoutException(duration=600s)
2020-08-21T12:44:23.1625590Z         at io.kotest.core.runtime.ExecutorExecutionContext$executeWithTimeoutInterruption$$inlined$suspendCoroutine$lambda$1.run(ExecutorExecutionContext.kt:39)
2020-08-21T12:44:23.1625750Z         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2020-08-21T12:44:23.1625860Z         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-08-21T12:44:23.1625980Z         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
2020-08-21T12:44:23.1626110Z         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2020-08-21T12:44:23.1626230Z         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-08-21T12:44:23.1626340Z         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2020-08-21T12:44:23.1626450Z         at java.lang.Thread.run(Thread.java:748)
2020-08-21T12:44:23.1626520Z 
2020-08-21T12:44:23.1626610Z arrow.fx.coroutines.stream.CancellationTest > executionError FAILED
2020-08-21T12:44:23.1626710Z     TimeoutException(duration=600s)
2020-08-21T12:44:23.1626820Z         at io.kotest.core.runtime.ExecutorExecutionContext$executeWithTimeoutInterruption$$inlined$suspendCoroutine$lambda$1.run(ExecutorExecutionContext.kt:39)
2020-08-21T12:44:23.1626940Z         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2020-08-21T12:44:23.1627050Z         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-08-21T12:44:23.1627170Z         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
2020-08-21T12:44:23.1627300Z         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2020-08-21T12:44:23.1627420Z         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-08-21T12:44:23.1627670Z         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2020-08-21T12:44:23.1627780Z         at java.lang.Thread.run(Thread.java:748)

@rachelcarmena rachelcarmena merged commit 9cf0be3 into master Aug 21, 2020
@rachelcarmena rachelcarmena deleted the sv-improve-parMapN-syntax branch August 21, 2020 15:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants