Tibor17 edited a comment on pull request #77: URL: https://github.com/apache/maven-resolver/pull/77#issuecomment-817372645
Hey guys, I did not want to participate because the impl and API is too complicated. We all have experiences but this PR is a signal for me that when I start implementing my own Lock then there must be something wrong with me. I did it with Java's `LockSupport` parking and unparking the Threads and it was somehow working but rather used Java's lock. Here it is similar and I think it is due to the API. The concept starts with the `Collection` passed to the method `acquire`: ``` try { syncContext.acquire( artifacts, metadatas ); // work with the artifacts and metadatas } finally { syncContext.close(); } ``` It would be more simple to use make the parallelism at one layer below, this means the collection may become a stream but the lock would be in the thread pool. It may be so simple that you create the Artifact and push it to the queue of `ThreadPoolExecutor`. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org