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

ReentrantLock::toString less helpful when thread does not have a name

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      ReentrantLock::toString and ReentrantReadWriteLock.WriteLock::toString include the thread name when locked (or holding the write lock). This is okay when all threads name have a unique name but we might have to re-examine it for virtual threads as they don't get a name by default. Including the thread identifier in the String might work but changing it might be an incompatible change due to the String representation being specified.

            vklang Viktor Klang
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: