/*
 * Java Genetic Algorithm Library (@__identifier__@).
 * Copyright (c) @__year__@ Franz Wilhelmstötter
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Author:
 *    Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
 */
package org.jenetics.engine;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version !__version__!
 * @since !__version__!
 */
public class EngineExecutorTest {
}

@@ -768,180 +768,1159 @@
 e;%0A%0A
-/**%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @version !__version__!%0A * @since !__version__!%0A */%0Apublic class EngineExecutorTest %7B
+import java.util.concurrent.Executor;%0Aimport java.util.concurrent.ExecutorService;%0Aimport java.util.concurrent.Executors;%0Aimport java.util.concurrent.ForkJoinPool;%0Aimport java.util.stream.IntStream;%0A%0Aimport org.jenetics.DoubleChromosome;%0Aimport org.jenetics.DoubleGene;%0Aimport org.jenetics.Genotype;%0A%0A/**%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A */%0Apublic class EngineExecutorTest %7B%0A%0A%09private static double f(final Genotype%3CDoubleGene%3E gt) %7B%0A%09%09return IntStream.range(0, 50000)%0A%09%09%09.mapToDouble(Math::sinh)%0A%09%09%09.sum()*gt.getGene().getAllele();%0A%09%7D%0A%0A%09public static void main(final String%5B%5D args) %7B%0A%09%09//final ExecutorService executor = Executors.newFixedThreadPool(2);%0A%0A%09%09final Engine%3CDoubleGene, Double%3E engine = Engine%0A%09%09%09.builder(EngineExecutorTest::f, DoubleChromosome.of(0, 1))%0A%09%09%09.executor(new ForkJoinPool(1))%0A%09%09%09.build();%0A%0A%09%09for (int i = 0; i %3C 1000; ++i) %7B%0A%09%09%09final Double result = engine.stream()%0A%09%09%09%09.limit(100)%0A%09%09%09%09.collect(EvolutionResult.toBestGenotype())%0A%09%09%09%09.getGene().getAllele();%0A%0A%09%09%09System.out.println(%22Gen: %22 + i + %22: %22 + result);%0A%09%09%7D%0A%0A%09%09//executor.shutdown();%0A%09%09System.out.println(%22READY%22);%0A%09%7D%0A%0A
 %0A%7D%0A

Add test case for different executors used by the evolution engine.