mbien commented on PR #9642:
URL: https://github.com/apache/netbeans/pull/9642#issuecomment-6092325190

   > * Single-threaded collection: `aether.dependencyCollector.bf.threads=1` in 
`EmbedderFactory.cloneStaticProps()` reaches every session the embedder creates 
(Maven copies system properties into the session config);
   
   To add a little context, this is only needed so that the following call path 
doesn't fork more threads behind the scenes, since some hacks there use thread 
local storage for communication between method calls:
   
   `MavenProjectCache.loadOriginalMavenProjectInternal()` calls 
`NbArtifactFixer.collectPlaceholderArtifacts` passing two lambdas as parameter. 
The first lambda calls `projectEmbedder.readProjectWithDependencies()` this 
triggers the downcall from resolver code into `NbArtifactFixer.resolve()`
   
   For the hack inside `NbArtifactFixer` to continue working the thread is not 
allowed to change between `collectPlaceholderArtifacts()` and `resolve()`. So 
if resolver forks, this all breaks since all thread locals are empty.
   
   Everything else can remain multithreaded -> if it doesn't its also fine. 
Hopefully this can be all cleaned up at some point so that it is maintainable 
again.
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to