1660 |
|
} |
1661 |
|
} |
1662 |
|
|
1663 |
+ |
/** |
1664 |
+ |
* Helps and/or blocks until the given task is done or timeout. |
1665 |
+ |
* First tries locally helping, then scans other queues for a task |
1666 |
+ |
* produced by one of w's stealers; compensating and blocking if |
1667 |
+ |
* none are found (rescanning if tryCompensate fails). |
1668 |
+ |
* |
1669 |
+ |
* @param w caller |
1670 |
+ |
* @param task the task |
1671 |
+ |
* @param deadline for timed waits, if nonzero |
1672 |
+ |
* @return task status on exit |
1673 |
+ |
*/ |
1674 |
|
final int awaitJoin(WorkQueue w, ForkJoinTask<?> task, long deadline) { |
1675 |
|
int s = 0; |
1676 |
|
if (w != null && task != null && |