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

Java thread that calls stop() for itself hangs the runtime

XMLWordPrintable

    • generic
    • windows_95

      The Thread.stop() method is flawed in JDK 1.0.2 for Windows 95. If a
      thread calls stop() on itself, that thread is hung without being
      properly cleaned up, and when the application (not applet) attempts to
      exit, the application hangs forever (probably waiting for the hung
      thread to terminate or something).

      It does work when run using jdb however.

      Here is the test program:

      class StopSelf implements Runnable {

      public
      void run() {
      Thread.currentThread().stop();
      System.out.println("After stop?");
      }

      static public
      void main(String vSt[]) {
      new Thread(new StopSelf(), "StopSelf").start();
      }
      }

            tlindholsunw Timothy Lindholm (Inactive)
            mchansunw Mei Chan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: