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

Comparing jsr166/src/main/java/util/concurrent/CompletableFuture.java (file contents):
Revision 1.180 by jsr166, Sun Nov 15 23:31:51 2015 UTC vs.
Revision 1.181 by jsr166, Sun Jan 24 22:41:31 2016 UTC

# Line 205 | Line 205 | public class CompletableFuture<T> implem
205       * Without precautions, CompletableFutures would be prone to
206       * garbage accumulation as chains of Completions build up, each
207       * pointing back to its sources. So we null out fields as soon as
208 <     * possible (see especially method Completion.detach). The
209 <     * screening checks needed anyway harmlessly ignore null arguments
210 <     * that may have been obtained during races with threads nulling
211 <     * out fields.  We also try to unlink fired Completions from
212 <     * stacks that might never be popped (see method postFire).
213 <     * Completion fields need not be declared as final or volatile
214 <     * because they are only visible to other threads upon safe
215 <     * publication.
208 >     * possible.  The screening checks needed anyway harmlessly ignore
209 >     * null arguments that may have been obtained during races with
210 >     * threads nulling out fields.  We also try to unlink fired
211 >     * Completions from stacks that might never be popped (see method
212 >     * postFire).  Completion fields need not be declared as final or
213 >     * volatile because they are only visible to other threads upon
214 >     * safe publication.
215       */
216  
217      volatile Object result;       // Either the result or boxed AltResult

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines