SunSpot: UnableToDeepSleep

Problem:
When we use sleepMgr.ensureDeepSleep(...), it goes to UnableToDeepSleepException even we don't have any thread running. The error says that "another thread is runnable within x",

Cause:
Because of many system threads which run from time to time, sunspot won't let us do ensuredeepsleep.

Solution:
We just call the command to block every thread running which is Thread.sleep(...) or Utils.sleep(...). Then, the spot will go to deepsleep.

Note: In my experiment, OTA doesn't affect with deepsleep mode.

References: https://www.sunspotworld.com/forums/viewtopic.php?p=7755

Comments

Popular posts from this blog

Linking verb - seem, sound, smell, appear, become, get, feel (Verb of Senses)

Phrasal Verb (กิริยาวลี) ที่ใช้บ่อย

If Clause 3 แบบ (Conditional Statement)