Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread.start()

 
rani vini
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me
Why the start() method in the Thread class is not final? What will happen if I override start method?
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So that you can do any special processing before and/or after starting a new thread. Why do you think start() should be marked final?

BTW this is not a BEA/Weblogic question. I think it should be moved to another forum.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rani vini wrote:Can anyone tell me
Why the start() method in the Thread class is not final? What will happen if I override start method?


I think, this is a good question indeed! BTW, the start() method in the Thread class does,

1) Registering our Thread with the thread scheduler then, only the thread scheduler allocate CPU and memory type of resources for this thread.
2) calls run() of the Thread,

Then it's up to the run() method to do further....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic