title: BroadcastReceiver and ReentrantLock. Are there any problems?
body: <p>I'm developing a clickable widget. I want to use a static java.util.concurrent.locks ReentrantLock so the widget logic is only called once at a time. </p>
  
  <p>But my fear is, that it may be possible in a very rare condition that the lock is not released, because it is killed beforehand because of the 10 seconds lifecycle window.</p>
  
  <p>Are there objections using a ReentrantLock at all? What is the best way to release the lock?</p>
  
  <p>Or maybe is there a a Android option to run it only single threaded?</p>
  
  <p>At the moment I'm thinking about releasing the lock at the end of the onReceive in a finally block or in the finalize method (ouch).</p>