a question about thread
From: Toro (spam_at_spam.com)
Date: 10/29/03
- Next message: David Gavini: "Re: UnsupportedOperationException is thrown inconsistently"
- Previous message: Thomas Schodt: "Re: solving a mathematical brain teaser"
- Next in thread: Toro: "Re: a question about thread"
- Reply: Toro: "Re: a question about thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Oct 2003 18:08:37 +0800
my program works like this,
public class ClassB {
public static void main(String[] args)throws Exception {
while (true){
ClassA obj_A= new ClassA ();
Thread thread = new Thread(obj_A);
if (condition 1) {
thread.setPriority(1);
}else
thread.setPriority(10);
thread.start();
}
}
}
ClassA implements the Runnable interface and provides the run method to the
thread.
- Next message: David Gavini: "Re: UnsupportedOperationException is thrown inconsistently"
- Previous message: Thomas Schodt: "Re: solving a mathematical brain teaser"
- Next in thread: Toro: "Re: a question about thread"
- Reply: Toro: "Re: a question about thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]