< prev index next >

src/java.base/share/classes/java/util/concurrent/CountedCompleter.java

Print this page
8197531: Miscellaneous changes imported from jsr166 CVS 2018-04
Reviewed-by: martin, psandoz


 758      */
 759     public T getRawResult() { return null; }
 760 
 761     /**
 762      * A method that result-bearing CountedCompleters may optionally
 763      * use to help maintain result data.  By default, does nothing.
 764      * Overrides are not recommended. However, if this method is
 765      * overridden to update existing objects or fields, then it must
 766      * in general be defined to be thread-safe.
 767      */
 768     protected void setRawResult(T t) { }
 769 
 770     // VarHandle mechanics
 771     private static final VarHandle PENDING;
 772     static {
 773         try {
 774             MethodHandles.Lookup l = MethodHandles.lookup();
 775             PENDING = l.findVarHandle(CountedCompleter.class, "pending", int.class);
 776 
 777         } catch (ReflectiveOperationException e) {
 778             throw new Error(e);
 779         }
 780     }
 781 }


 758      */
 759     public T getRawResult() { return null; }
 760 
 761     /**
 762      * A method that result-bearing CountedCompleters may optionally
 763      * use to help maintain result data.  By default, does nothing.
 764      * Overrides are not recommended. However, if this method is
 765      * overridden to update existing objects or fields, then it must
 766      * in general be defined to be thread-safe.
 767      */
 768     protected void setRawResult(T t) { }
 769 
 770     // VarHandle mechanics
 771     private static final VarHandle PENDING;
 772     static {
 773         try {
 774             MethodHandles.Lookup l = MethodHandles.lookup();
 775             PENDING = l.findVarHandle(CountedCompleter.class, "pending", int.class);
 776 
 777         } catch (ReflectiveOperationException e) {
 778             throw new ExceptionInInitializerError(e);
 779         }
 780     }
 781 }
< prev index next >