[ 
https://issues.apache.org/jira/browse/MRESOLVER-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630309#comment-17630309
 ] 

ASF GitHub Bot commented on MRESOLVER-283:
------------------------------------------

cstamas commented on PR #213:
URL: https://github.com/apache/maven-resolver/pull/213#issuecomment-1306915519

   > Sharing executors must be done with caution.
   > 
   > Is there any way that the executor may be running out of threads to 
service a call ? For example, resolving multiple files in parallel, each file 
being resolved in its own thread, then downloading dependencies and running out 
of threads ?
   > 
   > I think using a more general `ForkJoinPool` which supports work stealing 
would be safer to avoid running into such problems.
   
   I kinda agree with @gnodet  here, and will "tone down" this PR to NOT SHARE 
executors, merely will introduce this facade but instances will be handled as 
before (as even now, it is not 100% what it was before: collector had per arg 
instance, now shared). And I cannot certainly asnwer the question "Is there any 
way that the executor may be running out of threads to service a call".
   
   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).
   
   ---
   
   Hence, this PR will change to merely "centralize executor creation and 
(probably) use ResolverExecutor shim instead directly exposing ExecutorService 
iface"...




> 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)

Reply via email to