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

Make parallel platform gen task scheduler the default one #336

Merged
merged 1 commit into from
May 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@

public class BomDecomposer {

public static boolean isParallelProcessing() {
return Boolean.getBoolean("parallelProcessing");
}

public static BomDecomposerConfig config() {
return new BomDecomposer().new BomDecomposerConfig();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.Phaser;

public class ConcurrentTaskScheduler implements PlatformGenTaskScheduler {
public class ParallelTaskScheduler implements PlatformGenTaskScheduler {

private final Phaser phaser = new Phaser(1);
private final Deque<Exception> errors = new ConcurrentLinkedDeque<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package io.quarkus.bom.task;

import io.quarkus.bom.decomposer.BomDecomposer;
import java.util.Collection;

public interface PlatformGenTaskScheduler {

boolean IS_PARALLEL_DEFAULT = !Boolean.getBoolean("sequentialTaskScheduler");

static PlatformGenTaskScheduler getInstance() {
return BomDecomposer.isParallelProcessing() ? new ConcurrentTaskScheduler() : new SequentialTaskScheduler();
return IS_PARALLEL_DEFAULT ? new ParallelTaskScheduler() : new SequentialTaskScheduler();
}

void schedule(PlatformGenTask task) throws Exception;
Expand Down
Loading