--- jsr166/src/jsr166y/ForkJoinWorkerThread.java 2010/09/01 20:15:43 1.44 +++ jsr166/src/jsr166y/ForkJoinWorkerThread.java 2010/09/04 00:08:04 1.45 @@ -313,7 +313,7 @@ public class ForkJoinWorkerThread extend } /** - * Performs additional initialization and starts this thread + * Performs additional initialization and starts this thread. */ final void start(int poolIndex, UncaughtExceptionHandler ueh) { this.poolIndex = poolIndex; @@ -416,7 +416,7 @@ public class ForkJoinWorkerThread extend // helpers for run() /** - * Find and execute tasks and check status while running + * Finds and executes tasks, and checks status while running. */ private void mainLoop() { boolean ran = false; // true if ran a task on last step @@ -430,7 +430,7 @@ public class ForkJoinWorkerThread extend } /** - * Try to steal a task and execute it + * Tries to steal a task and execute it. * * @return true if ran a task */ @@ -517,7 +517,7 @@ public class ForkJoinWorkerThread extend * range. This method is used only during resets and backouts. */ private static final void writeSlot(ForkJoinTask[] q, int i, - ForkJoinTask t) { + ForkJoinTask t) { UNSAFE.putObjectVolatile(q, (i << qShift) + qBase, t); } @@ -628,7 +628,7 @@ public class ForkJoinWorkerThread extend } /** - * Returns next task or null if empty or contended + * Returns next task, or null if empty or contended. */ final ForkJoinTask peekTask() { ForkJoinTask[] q = queue; @@ -670,7 +670,7 @@ public class ForkJoinWorkerThread extend * Computes next value for random victim probe in scan(). Scans * don't require a very high quality generator, but also not a * crummy one. Marsaglia xor-shift is cheap and works well enough. - * Note: This is manually inlined in scan() + * Note: This is manually inlined in scan(). */ private static final int xorShift(int r) { r ^= r << 13; @@ -776,7 +776,7 @@ public class ForkJoinWorkerThread extend } /** - * Sets state to TERMINATED. Called only by onTermination() + * Sets state to TERMINATED. Called only by onTermination(). */ private void setTerminated() { int s;