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

ThreadMXBean::get*ThreadCount methods including virtual threads

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 19
    • core-svc

      As per the spec of the below methods
      getDaemonThreadCount()
      getPeakThreadCount()
      getThreadCount()

      Expected :
      "The count does not include virtual threads."
      Actual:
      It looks the count includes the virtual threads.

      The sample attached logs the values
      The values are 8 12 , if we comment the virtual thread in the code the count reduces.

        1. GetPeakThreadCount.java
          2 kB
          Krushnareddy Ganapureddy

            alanb Alan Bateman
            kganapureddy Krushnareddy Ganapureddy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: