[2627] in java-interest

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

Bug in thread create / join ?

daemon@ATHENA.MIT.EDU (Bob Beck)
Sat Oct 7 09:49:05 1995

Date: Fri, 6 Oct 95 10:08 PDT
To: java-interest@java.sun.com
From: Bob Beck <rbk@ibeam.jf.intel.com>

On my NT 3.51 system running java alpha3, the following code seems to always
hang after a while:

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();
            t.join();
        }
    }

    public void run()
    {
        System.out.println(Thread.currentThread().getName());
    }
}

I've had it go as few as 241 times, as many as 7500 (or so) times, but it
always seems to hang.  Am I doing something wrong, or is there a bug here?
--
Bob Beck                rbk@ibeam.intel.com     CompuServe: 71674,106
Intel Corporation       (503)264-8856           AOL: RDBeck

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

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