[
https://issues.apache.org/jira/browse/MRESOLVER-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630324#comment-17630324
]
ASF GitHub Bot commented on MRESOLVER-283:
------------------------------------------
gnodet commented on PR #213:
URL: https://github.com/apache/maven-resolver/pull/213#issuecomment-1306971573
> OTOH, I disagree with forkjoinpool: all these threads will do (probably
blocking, maybe inifinite) HTTP IO, not to mention the refactoring needed to
use them (most of "client" code remained unchanged here, using plain Runnable
and Callable).
`ForkJoinPool` is capable of handling blocking operations, just like a
standard `ThreadPoolExecutor`. The only problem is when you don't use your own
instance and reuse the system provided instance with blocking operations. The
only difference between a `ForkJoinPool` and a `ThreadPoolExecutor` is that the
former has more features such as thread affinity, work stealing and fork/join
operations.
I think a single thread pool is a good idea, but it has to be implemented in
a correct way to avoid any thread exhaustion. I.e. use a single fork/join pool
and use the appropriate methods to dispatch all the work, which should ensure
proper ordering of tasks execution. I've done a similar thing in
https://github.com/apache/maven/pull/803 (which I need to finish).
> Introduce resolver wide "shared" executor service
> -------------------------------------------------
>
> Key: MRESOLVER-283
> URL: https://issues.apache.org/jira/browse/MRESOLVER-283
> Project: Maven Resolver
> Issue Type: Improvement
> Components: Resolver
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 1.9.0
>
>
> More and more component in resolver does parallel processing (BF collector,
> MD resolver, basic connector), and they all create, maintain their own
> executor instance.
> Instead of this, create one shared service component and just reuse it
> accross resolver.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)