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 |
|
/** |