title: What does Future.cancel() do if not interrupting?
body: <p>From <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html#cancel%28boolean%29">java docs on Future.cancel()</a></p>
  
  <pre><code>boolean cancel(boolean mayInterruptIfRunning)
  </code></pre>
  
  <blockquote>
    <p>Attempts to cancel execution of this task. This attempt will fail if the task has already completed, has already been cancelled, or could not be cancelled for some other reason. If successful, and this task has not started when cancel is called, this task should never run. If the task has already started, <strong>then the mayInterruptIfRunning parameter determines whether the thread executing this task should be interrupted</strong> in an attempt to stop the task.</p>
  </blockquote>
  
  <p>My question is what does cancel do if mayInterruptIfRunning  is false?<br>
  how does it cancel or stop the task from executing if it has already been run?</p>