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.36 by dl, Wed May 11 23:47:58 2005 UTC vs.
Revision 1.37 by dl, Thu May 12 00:12:38 2005 UTC

# Line 265 | Line 265 | public class FutureTask<V> implements Fu
265                  return;
266              try {
267                  runner = Thread.currentThread();
268 <                if (getState() == RUNNING)
268 >                if (getState() == RUNNING) // recheck after setting thread
269                      innerSet(callable.call());
270                  else
271 <                    runner = null;
271 >                    releaseShared(0); // cancel
272              } catch (Throwable ex) {
273                  innerSetException(ex);
274              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines