Merged
Conversation
slawekjaranowski
approved these changes
Aug 13, 2025
cstamas
commented
Aug 13, 2025
| return DIRECT; | ||
| } | ||
| } | ||
| return new SmartExecutor.Limited(Executors.newThreadPerTaskExecutor(Thread.ofVirtual().name(namePrefix, 1).factory()),maxConcurrentTasks); |
Member
Author
There was a problem hiding this comment.
@slawekjaranowski seems spotless ignores, or is unaware of this class, as this class clearly have formatting issues and build did not fail.
Member
There was a problem hiding this comment.
default value for java sources is:
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
https://github.com/diffplug/spotless/tree/main/plugin-maven#java
😄
cstamas
commented
Aug 13, 2025
maven-resolver-util/src/main/java21/org/eclipse/aether/util/concurrency/SmartExecutorUtils.java
Outdated
Show resolved
Hide resolved
cstamas
commented
Aug 13, 2025
maven-resolver-util/src/main/java21/org/eclipse/aether/util/concurrency/SmartExecutorUtils.java
Outdated
Show resolved
Hide resolved
cstamas
commented
Aug 13, 2025
maven-resolver-util/src/main/java/org/eclipse/aether/util/concurrency/SmartExecutorUtils.java
Outdated
Show resolved
Hide resolved
…urrency/SmartExecutorUtils.java
…ncurrency/SmartExecutorUtils.java
…ncurrency/SmartExecutorUtils.java
@cstamas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rework thread management.
High level changes:
SmartExecutorto hide underlying things; offer minimal surface just enough for consumersDetails:
SmartExecutorinstances (basic connector exceptions for direct execution explained above)Consequences: the parameters
aether.connector.basic.downstreamThreads,aether.connector.basic.upstreamThreadsandaether.connector.basic.threads(they may be suffixed with.repoId)aether.dependencyCollector.bf.threadsaether.metadataResolver.threadsare from now on global and reflect the reality for maven session, in a way they are now truly aplied per-Maven session (limits now represent true per-session limits).
Before, this was not the case, and Maven was able to fully "step over" these limits: consider BF collector, it created always "local" thread pool with size 5. But alas, Maven 4 builds project models already in parallel (!), hence, BF collector (to resolve models for model builder) was already called from several threads, and each thread created "local" pool for it's own use.
This may imply that pool sizes may need a revisit, as they may be too conservative now (or they were just not truly applied, as intended).
Fixes #1537