mirror of https://github.com/apache/maven.git
[MNG-6471] Parallel builder should use the module name as thread name
This closes #177
This commit is contained in:
parent
b23116d626
commit
a242c1a912
|
@ -187,12 +187,23 @@ public class MultiThreadedBuilder
|
|||
{
|
||||
return () ->
|
||||
{
|
||||
// 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 );
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue