hi all, Is there possible to awake a thread that being sleep??
eg. MyThreadName.sleep(1000000); Based on some logic, sometimes i would like to awake the MyThreadName at specific time secs.
If the question been posted, pls provide the url. Thanks anyway. Kind regards, KH
If you can't change the direction the the wind, change your sail.
J Kneeland
Ranch Hand
Joined: Aug 15, 2004
Posts: 31
posted
0
From inside of it or outside?
You could always just interrupt it.
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
posted
0
From your mention of logic to decide when to wake it up I wondered if you might know the wakeup time before you go to sleep? If so,it's pretty easy to do something like this:
Or see Timer to make something happen at a specific time.
If you don't know the wake time before you sleep, that interrupt suggestion is perfect.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi