ThreadGroup queston
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   wu_qihua
Posted On:   Monday, April 21, 2003 08:25 PM

For jboss source code,the start(run) point of is main() method of Main class,and is it nessary to create a threadgroup.Why not just use new Thread(worker).start(); the source codse of Main class is : Runnable worker = new Runnable() { public void run() { try { Main main = new Main(); main.boot(args); } catch (Exception e) { System.err.println("Failed to boot JBoss:"); e.printStackTrace(); } } }; ThreadGroup threads = new ThreadGroup("jboss"); new Thread(threads, worker, "main").start();    More>>
			
For jboss source code,the start(run) point of is main()
method of Main class,and is it nessary to create a
threadgroup.Why not just use
new Thread(worker).start();

the source codse of Main class is :
Runnable worker = new Runnable() {
public void run()
{
try
{
Main main = new Main();
main.boot(args);
}
catch (Exception e)
{
System.err.println("Failed to boot JBoss:");
e.printStackTrace();
}
}

};

ThreadGroup threads = new ThreadGroup("jboss");
new Thread(threads, worker, "main").start();

   <<Less
About | Sitemap | Contact