I have put up my revision notes here; see if they are of any help. HTH, - Manish
Nandkishore Dhilde
Greenhorn
Joined: May 09, 2002
Posts: 20
posted
0
Hello Manish I am New Member For begin with it I found ur Notes worth Thanks
SCJP1.4 certified, IBM SOA Solution Designer[2007]
Nancy Tang
Greenhorn
Joined: Oct 10, 2001
Posts: 8
posted
0
Hi Manish It's great. Thank you. Nancy
Wei Du
Greenhorn
Joined: May 03, 2002
Posts: 16
posted
0
In Manish's notes:
The methods sleep() and yield() are static methods of the thead class, they ALWAYS work on the thread from which they are invoked.
I thought sleep() and yield() alway work on the currently running thread, may or may not be the thread from which they are invoked (called). Is that right?
Originally posted by Wei Du: I thought sleep() and yield() alway work on the currently running thread, may or may not be the thread from which they are invoked (called). Is that right?
I think you have a valid point here. Can somebody confirm/elaborate this? So that I can make the necessary changes. TIA, - Manish
Jose Botella
Ranch Hand
Joined: Jul 03, 2001
Posts: 2120
posted
0
sleep and yield always act on the currently executing thread. This is the one that is executing a command like this: aThread.yield(); maybe there is a possible confusion because it could be thought that the currently executing thread is aThread. But this is not the case. yield acts on the thread that is executing the above piece of code.