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
Joined: Jul 03, 2001
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.