Forums Register Login

wait()

+Pie Number of slices to send: Send
I would like to know whether wait() method belongs to class Thread or it belongs to class object? Since, when wait() is implemented in classes it is just called as wait() and not being called by any object inside a synchronous method.
+Pie Number of slices to send: Send
 

Originally posted by sai donthneni:
I would like to know whether wait() method belongs to class Thread or it belongs to class object? Since, when wait() is implemented in classes it is just called as wait() and not being called by any object inside a synchronous method.



Well the wait() method is public in Object which means it is inherited by every class including Thread.

What's important is the thread that calls the wait() method. Whatever thread calls it will place itself into the waiting state.
[ April 10, 2006: Message edited by: Keith Lynn ]
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 612 times.
Similar Threads
Static Methods and Instance Methods
Basic question on wait & notify
thread question
Base Class variable
wait()
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:02:44.