rmannibucau commented on pull request #65:
URL: https://github.com/apache/maven-resolver/pull/65#issuecomment-661669355


   If the context is not global it is broken in case of -T and 2 modules 
resolving concurrently the same artifact - or you synchronize it and break 
concurrent feature. So at the end it must be - as a map must be for the per 
artifact lock.
   
   Agree takari impl has the mentionned issue - but comments make me think any 
file based impl too - but it is less far than a complete impl - in terms of 
design - than a global lock IMHO (the concurrent impl is key for me since most 
user project will me multimodules).
   
   So if i summarize: file locking must happen in a single thread per jvm and I 
would like it to be per artifact.
   Means we must have a dedicated thread with an event loop dedicated to lock 
files ($artifact.lock ?) And releasing them? Wouldnt it work better? Then state 
per artifact does not need the int or lock there too since the second lock call 
would block the caller (with a completionstage or equivalent callback like api) 
but not the event loop itself.
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to