Forums Register Login

Thread.sleep(milisec)

+Pie Number of slices to send: Send
i know that sleep method coz current thread to suspend its execution
for milisec ok!! but my question is about the exception thrown by this method is InterrupedException when will this excetion is thrown by
sleep()?

+Pie Number of slices to send: Send
InterruptedException is thrown from Thread.sleep() when another thread calls interrupt() on the sleeping thread.
+Pie Number of slices to send: Send
thnks but not satisfied
Replace the word "snake" with "danger noodle" in all tiny ads.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 813 times.
Similar Threads
one more question from Dan's questions
Threads and Exceptions
Sleepy Threads
wait in idle mode?
thread
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:33:17.