You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/05/28 06:09:30 UTC

[GitHub] [maven-resolver] cstamas commented on pull request #108: [MRESOLVER-184] Destroy Redisson semaphores if not used anymore

cstamas commented on pull request #108:
URL: https://github.com/apache/maven-resolver/pull/108#issuecomment-850164274


   IMO -1 for this PR (but +1 for removal of semaphores, but let's do it differently), let me explain:
   a) you do same thing as lock factory (map of locks by name), repeating 
   b) lets add new method (ie. `destroy()`) on NamedLockSupport that is by default noop, and is overridden by those (redis, hz) that needs to do something when lock destroyed by factory (as ref count goes to 0).
   
   This way, all this PR becomes just a change in `createLock` method, where you override `destroy` method of created NamedLockSupport. WDYT?


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