caiwei-ebay commented on code in PR #178:
URL: https://github.com/apache/maven-resolver/pull/178#discussion_r983545613


##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/bf/BfDependencyCollector.java:
##########
@@ -365,6 +466,90 @@ else if ( descriptorResult == DataPool.NO_DESCRIPTOR )
         return descriptorResult;
     }
 
+    static class ParallelDescriptorResolver
+    {
+        final ExecutorService executorService;
+
+        /**
+         * Artifact ID -> Future of DescriptorResolutionResult
+         */
+        final Map<String, Future<DescriptorResolutionResult>> results = new 
ConcurrentHashMap<>( 256 );
+        final Logger logger = LoggerFactory.getLogger( getClass() );
+
+        ParallelDescriptorResolver( RepositorySystemSession session )
+        {
+            this.executorService = getExecutorService( session );
+        }
+
+        Future<DescriptorResolutionResult> resolveDescriptors( Artifact 
artifact,

Review Comment:
   It is asnyc, in this way, multiple poms are downloaded in parallel. 
cacheVersionRangeDescriptor is actually caching a constantFuture.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to