Lines Matching defs:state

40      * on a "state" field updated via CAS to track completion, along
48 * The run state of this task, initially NEW. The run state
49 * transitions to a terminal state only in methods set,
50 * setException, and cancel. During completion, state may take on
57 * Possible state transitions:
63 private volatile int state;
75 private Object outcome; // non-volatile, protected by state reads/writes
84 * @param s completed state value
107 this.state = NEW; // ensure visibility of callable
124 this.state = NEW; // ensure visibility of callable
128 return state >= CANCELLED;
132 return state != NEW;
136 if (!(state == NEW &&
146 } finally { // final state
160 int s = state;
173 int s = state;
181 * Protected method invoked when this task transitions to state
203 UNSAFE.putOrderedInt(this, stateOffset, NORMAL); // final state
221 UNSAFE.putOrderedInt(this, stateOffset, EXCEPTIONAL); // final state
227 if (state != NEW ||
233 if (c != null && state == NEW) {
248 // runner must be non-null until state is settled to
251 // state must be re-read after nulling runner to prevent
253 int s = state;
261 * resets this future to initial state, failing to do so if the
269 if (state != NEW ||
274 int s = state;
286 // runner must be non-null until state is settled to
289 // state must be re-read after nulling runner to prevent
291 s = state;
306 while (state == INTERRUPTING)
309 // assert state == INTERRUPTED;
336 // assert state > COMPLETING;
365 * @return state upon completion
378 int s = state;
395 return state;
447 (k.getDeclaredField("state"));