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

(thread) Deprecate and provide alternative to Thread.getId()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Not an Issue
    • P4
    • None
    • 6, 7, 7u40, 8
    • core-libs
    • None
    • generic
    • generic

    Description

      See this discussion thread. http://cs.oswego.edu/pipermail/concurrency-interest/2013-June/011440.html

      The problem is that Thread.getId() can be overridden in subclasses and the value can be altered. Classes such as RecursiveReadersWriterLock (RRWL) depends upon getId() returning a unique value for each Thread. If this doesn't hold, then RRWL will be broken.

      The recommendation is that getId() be deprecated and a new final method be created such as getFinalId(), getImmutableId(), getFirmId(), or getStableId().

      Attachments

        Issue Links

          Activity

            People

              alanb Alan Bateman
              nreynold Nathan Reynolds
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: