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

move Cleaner initialization to startup

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 24
    • core-libs
    • None

      Currently, the Cleaner class is initialized in ReferenceHandler.run(). The comment there says:
      202 // pre-load and initialize Cleaner class so that we don't
      203 // get into trouble later in the run loop if there's
      204 // memory shortage while loading/initializing it lazily.
      However, doing it at the start of run() still relies on platform-specific thread scheduling to decide when the initialization happens. We are seeing strange failures on Windows because of this. See JDK-8329357.
      Moving the initialization of Cleaner to startReferenceHandlerThread() should make these kinds of startup failures more deterministic.

            Unassigned Unassigned
            dlong Dean Long
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: