title: Beginner questions: Wakelocks
body: <p>I am new to the notion of WakeLock and need your help.</p>
  
  <p>Questions:  </p>
  
  <ol>
  <li><p>I assume WakeLock to be some type of lock which when held by the executing code prevents the device from sleeping. What if the device is already in sleep/standby mode, will the code execute then? Assuming that it would never acquire a WakeLock?  </p></li>
  <li><p>When a long running task(abt 7-8 sec) is done in a background thread(AsyncTask) should I be bothered about holding a WakeLock? Does AsyncTask already acquire it for me?</p></li>
  <li><p>links to official documentations and writeup on wakelocks are appreciated.</p></li>
  </ol>
  
  <p>Thanks.</p>