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

ThreadLocal cannot be used in Swing application

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      Since Java 1.4 it is no longer possible to use a ThreadLocal variable in code executed through SwingUtilities.invokeLater(Runnable r). This is because the thread executing this code can die and be restarted in the startup phase of the application by the sun.awt.AWTAutoShutdown.SAFETY_TIMEOUT mechanism. After thread restart the ThreadLocal variable will then be lost.

      Attachments

        Activity

          People

            son Oleg Sukhodolsky (Inactive)
            amuellersunw Andreas Mueller (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: