377 |
|
} |
378 |
|
|
379 |
|
/** |
380 |
< |
* Attempt to CAS-increment the workerCount field of ctl. |
380 |
> |
* Attempts to CAS-increment the workerCount field of ctl. |
381 |
|
*/ |
382 |
|
private boolean compareAndIncrementWorkerCount(int expect) { |
383 |
|
return ctl.compareAndSet(expect, expect + 1); |
384 |
|
} |
385 |
|
|
386 |
|
/** |
387 |
< |
* Attempt to CAS-decrement the workerCount field of ctl. |
387 |
> |
* Attempts to CAS-decrement the workerCount field of ctl. |
388 |
|
*/ |
389 |
|
private boolean compareAndDecrementWorkerCount(int expect) { |
390 |
|
return ctl.compareAndSet(expect, expect - 1); |