ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Cancellable.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/Cancellable.java (file contents):
Revision 1.4 by jozart, Sat Jun 7 19:54:10 2003 UTC vs.
Revision 1.5 by dl, Sat Jun 21 12:23:28 2003 UTC

# Line 21 | Line 21 | package java.util.concurrent;
21   public interface Cancellable {
22  
23      /**
24 <     * Cancels execution of this task if it has not already completed.
25 <     * If this task has not started when <tt>cancel</tt> is called, this
26 <     * task will never run.  If the task has already started, then
27 <     * the <tt>interruptIfRunning</tt> parameter determines whether the
28 <     * thread executing this task should be interrupted in an attempt to
29 <     * stop the task.
24 >     * Attempts to cancel execution of this task.  This attempt will
25 >     * fail if the task has already completed or could not be
26 >     * cancelled for some other reason. If successful, and this task
27 >     * has not started when <tt>cancel</tt> is called, this task will
28 >     * never run.  If the task has already started, then the
29 >     * <tt>interruptIfRunning</tt> parameter determines whether the
30 >     * thread executing this task should be interrupted in an attempt
31 >     * to stop the task.
32       *
33       * @param mayInterruptIfRunning <tt>true</tt> if the thread executing this
34       * task should be interrupted; otherwise, in-progress tasks are allowed
35       * to complete
36 <     * @return <tt>true</tt> if task has not already completed or been
37 <     * cancelled; <tt>false</tt> otherwise
36 >     * @return <tt>false</tt> if the task could not be cancelled,
37 >     * typically because is has already completed normally;
38 >     * <tt>true</tt> otherwise
39       */
40      boolean cancel(boolean mayInterruptIfRunning);
41  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines