Hi, I am new at this mailinglist so I am not sure if the following question
is still discussed.
I am a little bit astonished about the java multithreating under linux. For
me it looks like that the multithreading with the semantic java is much
better. 

For example I tried the following programm:


class TestThread extends Thread {
        String txt;
        
        public TestThread(String t){
                txt = new String(t);
        }
        
        public void run(){
                for( int i = 0; i < 100; i++){
                    System.out.println( txt);
                }
        }
        
}


class main{
        
        public static void main(String[] args ){
                TestThread one, two, three;
                one = new TestThread(" one ");
                two = new TestThread(" two ");
                three = new TestThread(" three ");
                one.start();
                two.start();
                three.start();
        }
}





I expected following output:

one
two
three
one
two
three
...




or similar. Under win95 everything went fine.
Unter suse-linux 6.1 with jdk1.1.7 and TYA JIT I got following output:

one
one
one
.
.
.
two
two
two
.
.
.
three
three
three
.
.
.


This did not look like multithreading. It is the same if I use native
threads and not green threads. 
Has anybody an idea how to write   a   real multithread programm under
linux. I have to know it because we wrote a server and we want to run it
under linux and not under windows.

Thanks for our help

Holger


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to