Skip to content
Open
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 @@ -211,10 +211,10 @@ class BuildContext implements AutoCloseable {
session.getProjects().size());
// Propagate the parallel flag to the root session
session.setParallel(threads > 1);
this.executor = new PhasingExecutor(Executors.newFixedThreadPool(threads, new BuildThreadFactory()));

// build initial plan
// Build the initial plan before creating the executor so constructor failures cannot leak it.
this.plan = buildInitialPlan(taskSegments);
this.executor = new PhasingExecutor(Executors.newFixedThreadPool(threads, new BuildThreadFactory()));
}

BuildContext() {
Expand Down
Loading