> On 30 Aug 2023, at 14:02, Remi Forax <forax at univ-mlv.fr> wrote: > > > > Or you can use Google Common Cache [1] or Cafeine [2] to store the ReentrantLocks inside a concurrent cache with weak keys. Something like that is, indeed, part of the long-term effort of Java Object Monitors (JOM).