[GitHub] [maven-resolver] michael-o edited a comment on pull request #77: [MRESOLVER-145] SyncContext implementations

2021-04-11 Thread GitBox


michael-o edited a comment on pull request #77:
URL: https://github.com/apache/maven-resolver/pull/77#issuecomment-817367241


   There is one more thing I do not understand and think that this undermines 
reentrancy: While I understand that you maintain a concurrent map in 
`NamedLockFactorySupport` to manage locks (counts) between threads in one JVM 
to properly obtain and release them, but I fail to understand why both 
`AdaptedReadWriteLockNamedLock` and `AdaptedSemaphoreNamedLock` use thread 
locals to manage these locks. Looking at how lock and unlock are done, I don't 
see how underlying locks are used when reentrancy happens. Thus, the internal 
lock count is not increased, but you turn reentrancy into a `NOOP` and the end. 
Each call to `lockShared()`/`lockExclusively()` should be delegated to the 
underlying lock , no matter what. Please explain!


-- 
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:
us...@infra.apache.org




[GitHub] [maven-resolver] michael-o edited a comment on pull request #77: [MRESOLVER-145] SyncContext implementations

2021-03-27 Thread GitBox


michael-o edited a comment on pull request #77:
URL: https://github.com/apache/maven-resolver/pull/77#issuecomment-808807986


   I forgot to mention: I do really like the idea of the name mappers. I have 
used a similar approach in a completely different area years ago, but that code 
serves me daily thousands of times.


-- 
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:
us...@infra.apache.org