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

Comparing jsr166/src/main/java/util/concurrent/ForkJoinWorkerThread.java (file contents):
Revision 1.57 by jsr166, Wed May 22 20:36:28 2013 UTC vs.
Revision 1.58 by dl, Wed May 22 23:17:40 2013 UTC

# Line 62 | Line 62 | public class ForkJoinWorkerThread extend
62      /**
63       * Returns the index number of this thread in its pool.  The
64       * returned value ranges from zero to the maximum number of
65 <     * threads (minus one) that have ever been created in the pool.
65 >     * threads (minus one) that may exist in the pool.
66       * This method may be useful for applications that track status or
67       * collect results per-worker rather than per-task.
68       *
69       * @return the index number
70       */
71      public int getPoolIndex() {
72 <        return workQueue.poolIndex;
72 >        return workQueue.poolIndex >>> 1; // ignore odd/even tag bit
73      }
74  
75      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines