Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8287317

Implement `java.util.concurrent.ConcurrentWeakHashMap`

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      Currently, there’s multiple places in the JDK which reinvent the wheel to have a concurrent `WeakHashMap` by using `ConcurrentHashMap` with custom `WeakReference` subclasses for the keys, such as `java.lang.invoke.MethodType$ConcurrentWeakInternSet`.

      I propose to add `ConcurrentWeakHashMap` that would implement the `java.util.concurrent.ConcurrentMap` interface but use `WeakReference`s for the keys.


            smarks Stuart Marks
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: