[
https://issues.apache.org/jira/browse/MNG-8031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17839257#comment-17839257
]
ASF GitHub Bot commented on MNG-8031:
-------------------------------------
CrazyHZM commented on code in PR #1471:
URL: https://github.com/apache/maven/pull/1471#discussion_r1573331701
##########
maven-embedder/src/main/java/org/apache/maven/cli/transfer/SimplexTransferListener.java:
##########
@@ -0,0 +1,231 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.cli.transfer;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.function.Consumer;
+
+import org.eclipse.aether.transfer.AbstractTransferListener;
+import org.eclipse.aether.transfer.TransferCancelledException;
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transfer.TransferListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static java.util.Objects.requireNonNull;
+
+/**
+ * A {@link TransferListener} implementation that wraps another delegate
{@link TransferListener} but makes it run
+ * on single thread, keeping the listener logic simple. This listener also
blocks on last transfer event to allow
+ * output to perform possible cleanup. It spawns a daemon thread to consume
queued events that may fall in even
+ * concurrently.
+ *
+ * @since 4.0.0
Review Comment:
If we support it in 3.9.7, should it be changed to 3.9.7?
> Backport: Make Maven transfer listener used with Resolver more concurrent
> friendly
> ----------------------------------------------------------------------------------
>
> Key: MNG-8031
> URL: https://issues.apache.org/jira/browse/MNG-8031
> Project: Maven
> Issue Type: Improvement
> Components: Core
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 3.9.7
>
>
> Backport of MNG-8007
--
This message was sent by Atlassian Jira
(v8.20.10#820010)