[4977] in java-interest

home help back first fref pref prev next nref lref last post

Thread problem still exists in JDK 1.0 on NT

daemon@ATHENA.MIT.EDU (Bob Beck)
Wed Jan 24 22:28:06 1996

Date: Wed, 24 Jan 1996 17:45:53 -0800
To: java-bugs@java.sun.com
From: Bob Beck <rbk@ibeam.jf.intel.com>
Cc: java-interest@java.sun.com

I've reported this problem every release since Alpha3, and it still exists.
The attached code hangs typically within a few 100 thread creations.  I've
seen it hang at 16 iterations, and get as far as a few 1000, but it always
hangs.  This is on NT 3.51.

public class T16 implements Runnable
{
    public static void main(String args[])
    {
        T16 inst = new T16();
        for (int i = 0; ; i++) {
            Thread t = new Thread(inst, ""+i);
            t.start();
            try {
                t.join();
            } catch (Exception e) {
                System.out.println("Thread join interrupted??");
            }
        }
    }

    public void run()
    {
        System.out.println(Thread.currentThread().getName());
        //try { Thread.sleep(20); } catch (Exception e) { /*NOP*/ }
    }
}
--
Bob Beck             rbk@ibeam.intel.com  rbk@teleport.com
Intel Corporation    (503)264-8856        AOL: RDBeck CIS: 71674,106

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post