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

Removed Promise in favor of Future.join(). Made ForkJoinPool.commonPool() default ExecutorService. #2093

Merged
merged 7 commits into from
Sep 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,13 @@ We use these goals frequently to keep the dependencies and plugins up-to-date:
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<!-- ForkJoinPool configuration for io.vavr.concurrent.Future -->
<argLine>-Djava.util.concurrent.ForkJoinPool.common.parallelism=4</argLine>
<!-- parallel tests could lead to deadlocks because of limited common thread pool parallelism -->
<parallel>none</parallel>
<!-- ForkJoinPool parallelism for io.vavr.concurrent.Future.
Typically this is the number of cores by default.
In the travis-ci build env this is currently set to 1. -->
<!--<argLine>-Djava.util.concurrent.ForkJoinPool.common.parallelism=1</argLine>-->
<parallel>all</parallel>
<threadCount>4</threadCount>
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 0 additions & 3 deletions vavr/src/main/java/io/vavr/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import io.vavr.collection.TreeMap;
import io.vavr.collection.TreeSet;
import io.vavr.collection.Vector;
import io.vavr.concurrent.Future;
import io.vavr.control.Either;
import io.vavr.control.Option;
import io.vavr.control.Try;
Expand Down Expand Up @@ -1353,8 +1352,6 @@ default Stream<T> toStream() {
default Try<T> toTry() {
if (this instanceof Try) {
return (Try<T>) this;
} else if (this instanceof Future) {
return ((Future<T>) this).await().getValue().get();
} else {
return Try.of(this::get);
}
Expand Down
353 changes: 221 additions & 132 deletions vavr/src/main/java/io/vavr/concurrent/Future.java

Large diffs are not rendered by default.

Loading