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

Simplify thread creation in gtest and port 2 tests to new way

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • None
    • hotspot
    • None
    • b12

    Description

      Right now gtests that uses threads requires a lot of ceremony: Subclassing JavaTestThread, adding private members and constructors for state and passing in pointers to shared state. It's even worse when running many threads: allocating thread arrays, for-looping to populate the array, and so on.

      A thread is "just" a function and some initial state, so we can remove most of this ceremony by introducing a couple of small utilities.

      Finally, this change ports SymbolTable test_symbol_refcount_parallel and GlobalCounter critical_section to use the new tools.

      Attachments

        Issue Links

          Activity

            People

              jsjolen Johan Sjölen
              jsjolen Johan Sjölen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: