You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/07/11 16:04:17 UTC
[maven] branch 3.8.x/MNG-6471 created (now 405888e)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch 3.8.x/MNG-6471
in repository https://gitbox.apache.org/repos/asf/maven.git.
at 405888e [MNG-6471] Parallel builder should use the module name as thread name
This branch includes the following new commits:
new 405888e [MNG-6471] Parallel builder should use the module name as thread name
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven] 01/01: [MNG-6471] Parallel builder should use the module
name as thread name
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch 3.8.x/MNG-6471
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 405888e8d805dfd5969c3842977e79f2f54ca7b5
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Thu Sep 6 11:08:14 2018 +0200
[MNG-6471] Parallel builder should use the module name as thread name
This closes #177
---
.../builder/multithreaded/MultiThreadedBuilder.java | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
index 94d10af..2688a6b 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
@@ -186,12 +186,23 @@ public class MultiThreadedBuilder
{
public ProjectSegment call()
{
- // muxer.associateThreadWithProjectSegment( projectBuild );
- lifecycleModuleBuilder.buildProject( projectBuild.getSession(), rootSession, reactorContext,
- projectBuild.getProject(), taskSegment );
- // muxer.setThisModuleComplete( projectBuild );
+ final Thread currentThread = Thread.currentThread();
+ final String originalThreadName = currentThread.getName();
+ currentThread.setName( "mvn-builder-" + projectBuild.getProject().getId() );
- return projectBuild;
+ try
+ {
+ // muxer.associateThreadWithProjectSegment( projectBuild );
+ lifecycleModuleBuilder.buildProject( projectBuild.getSession(), rootSession, reactorContext,
+ projectBuild.getProject(), taskSegment );
+ // muxer.setThisModuleComplete( projectBuild );
+
+ return projectBuild;
+ }
+ finally
+ {
+ currentThread.setName( originalThreadName );
+ }
}
};
}