This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

awake a thread!

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From inside of it or outside?

You could always just interrupt it.

 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic