ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/ForkJoinTask.java
(Generate patch)

Comparing jsr166/src/jsr166y/ForkJoinTask.java (file contents):
Revision 1.8 by jsr166, Mon Jul 20 21:54:51 2009 UTC vs.
Revision 1.9 by jsr166, Mon Jul 20 22:26:03 2009 UTC

# Line 96 | Line 96 | import java.lang.reflect.*;
96   * by this class.
97   *
98   * <p>ForkJoinTasks should perform relatively small amounts of
99 < * computations, othewise splitting into smaller tasks. As a very
99 > * computations, otherwise splitting into smaller tasks. As a very
100   * rough rule of thumb, a task should perform more than 100 and less
101   * than 10000 basic computational steps. If tasks are too big, then
102 < * parellelism cannot improve throughput. If too small, then memory
102 > * parallelism cannot improve throughput. If too small, then memory
103   * and internal task maintenance overhead may overwhelm processing.
104   *
105   * <p>ForkJoinTasks are {@code Serializable}, which enables them
# Line 128 | Line 128 | public abstract class ForkJoinTask<V> im
128       * currently unused. Also value 0x80000000 is available as spare
129       * completion value.
130       */
131 <    volatile int status; // accessed directy by pool and workers
131 >    volatile int status; // accessed directly by pool and workers
132  
133      static final int COMPLETION_MASK      = 0xe0000000;
134      static final int NORMAL               = 0xe0000000; // == mask
# Line 575 | Line 575 | public abstract class ForkJoinTask<V> im
575       * {@code isDone} holds for all of them. If any task
576       * encounters an exception, others may be cancelled.  This method
577       * may be invoked only from within ForkJoinTask
578 <     * computations. Attempts to invoke in other contexts resul!t in
578 >     * computations. Attempts to invoke in other contexts result in
579       * exceptions or errors possibly including ClassCastException.
580       * @param tasks the collection of tasks
581       * @throws NullPointerException if tasks or any element are null.
# Line 639 | Line 639 | public abstract class ForkJoinTask<V> im
639  
640      /**
641       * Asserts that the results of this task's computation will not be
642 <     * used. If a cancellation occurs before atempting to execute this
642 >     * used. If a cancellation occurs before attempting to execute this
643       * task, then execution will be suppressed, {@code isCancelled}
644       * will report true, and {@code join} will result in a
645       * {@code CancellationException} being thrown. Otherwise, when
# Line 753 | Line 753 | public abstract class ForkJoinTask<V> im
753       * Possibly executes other tasks until this task is ready, then
754       * returns the result of the computation.  This method may be more
755       * efficient than {@code join}, but is only applicable when
756 <     * there are no potemtial dependencies between continuation of the
756 >     * there are no potential dependencies between continuation of the
757       * current task and that of any other task that might be executed
758       * while helping. (This usually holds for pure divide-and-conquer
759       * tasks). This method may be invoked only from within
760       * ForkJoinTask computations. Attempts to invoke in other contexts
761 <     * resul!t in exceptions or errors possibly including ClassCastException.
761 >     * result in exceptions or errors possibly including ClassCastException.
762       * @return the computed result
763       */
764      public final V helpJoin() {
# Line 771 | Line 771 | public abstract class ForkJoinTask<V> im
771      /**
772       * Possibly executes other tasks until this task is ready.  This
773       * method may be invoked only from within ForkJoinTask
774 <     * computations. Attempts to invoke in other contexts resul!t in
774 >     * computations. Attempts to invoke in other contexts result in
775       * exceptions or errors possibly including ClassCastException.
776       */
777      public final void quietlyHelpJoin() {
# Line 961 | Line 961 | public abstract class ForkJoinTask<V> im
961       * queued by the current thread but not yet executed, if one is
962       * available, or if not available, a task that was forked by some
963       * other thread, if available. Availability may be transient, so a
964 <     * {@code null} result does not necessarily imply quiecence
964 >     * {@code null} result does not necessarily imply quiescence
965       * of the pool this task is operating in.  This method is designed
966       * primarily to support extensions, and is unlikely to be useful
967       * otherwise.  This method may be invoked only from within

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines