michael-o commented 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 is 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: [email protected]
