# | Line 238 | Line 238 | public class FutureTask<V> implements Ru | |
---|---|---|
238 | if (s == RAN) | |
239 | return; | |
240 | if (s == CANCELLED) { | |
241 | + | // aggressively release to set runner to null, |
242 | + | // in case we are racing with a cancel request |
243 | + | // that will try to interrupt runner |
244 | releaseShared(0); | |
245 | return; | |
246 | } | |
# | Line 256 | Line 259 | public class FutureTask<V> implements Ru | |
259 | if (s == RAN) | |
260 | return; | |
261 | if (s == CANCELLED) { | |
262 | + | // aggressively release to set runner to null, |
263 | + | // in case we are racing with a cancel request |
264 | + | // that will try to interrupt runner |
265 | releaseShared(0); | |
266 | return; | |
267 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |