This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

all the methods of thread  RSS feed

 
Venkat Ramsimha
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

Is it possible to implement all the thread methods(say..start(),run(),wait(),notify(),notifyAll(),sleep(),dead(),etc., with in a sample program.If so
can anyone display a program impementing all the thread methods.Also please
mention the usage of each thread method as where and when to use..


looking forward....

tx&best regards
venkat
 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are already implemented as Thread is a class.

You can however extend Thread and override the methods.
The methods in Thread are native methods so overriding them will change there behavour and it will no long run as new Thread.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!