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.92 by jsr166, Mon Jun 20 05:23:56 2011 UTC vs.
Revision 1.93 by jsr166, Mon Jun 20 05:35:44 2011 UTC

# Line 242 | Line 242 | public class FutureTask<V> implements Ru
242                      set(result);
243              }
244          } finally {
245 +            // runner must be non-null until state is settled to
246 +            // prevent concurrent calls to run()
247              runner = null;
248 +            // state must be re-read after nulling runner to prevent
249 +            // leaked interrupts
250              int s = state;
251              if (s >= INTERRUPTING)
252                  handlePossibleCancellationInterrupt(s);
# Line 276 | Line 280 | public class FutureTask<V> implements Ru
280                  }
281              }
282          } finally {
283 +            // runner must be non-null until state is settled to
284 +            // prevent concurrent calls to run()
285              runner = null;
286 +            // state must be re-read after nulling runner to prevent
287 +            // leaked interrupts
288              s = state;
289              if (s >= INTERRUPTING)
290                  handlePossibleCancellationInterrupt(s);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines