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

Comparing jsr166/src/main/java/util/concurrent/FutureTask.java (file contents):
Revision 1.69 by jsr166, Fri Jun 17 22:45:07 2011 UTC vs.
Revision 1.70 by jsr166, Fri Jun 17 22:54:47 2011 UTC

# Line 50 | Line 50 | public class FutureTask<V> implements Ru
50       * During setCompletion, state may take on transient values of
51       * COMPLETING (while outcome is being set) or INTERRUPTING (only
52       * while interrupting the runner to satisfy a cancel(true)).
53 <     * State values are ordered and set to powers of two to simplify
54 <     * checks.
53 >     * State values are highly order-dependent to simplify checks.
54       *
55       * Possible state transitions:
56       * UNDECIDED -> COMPLETING -> NORMAL
# Line 60 | Line 59 | public class FutureTask<V> implements Ru
59       * UNDECIDED -> INTERRUPTING -> INTERRUPTED
60       */
61      private volatile int state;
62 <    private static final int UNDECIDED    = 0x00;
63 <    private static final int COMPLETING   = 0x01;
64 <    private static final int NORMAL       = 0x02;
65 <    private static final int EXCEPTIONAL  = 0x04;
66 <    private static final int CANCELLED    = 0x08;
67 <    private static final int INTERRUPTING = 0x10;
68 <    private static final int INTERRUPTED  = 0x20;
62 >    private static final int UNDECIDED    = 0;
63 >    private static final int COMPLETING   = 1;
64 >    private static final int NORMAL       = 2;
65 >    private static final int EXCEPTIONAL  = 3;
66 >    private static final int CANCELLED    = 4;
67 >    private static final int INTERRUPTING = 5;
68 >    private static final int INTERRUPTED  = 6;
69  
70      /** The underlying callable */
71      private final Callable<V> callable;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines