63 |
|
* encountering the exception; minimally only the latter. |
64 |
|
* |
65 |
|
* <p>It is possible to define and use ForkJoinTasks that may block, |
66 |
< |
* but doing do requires three further considerations: (1) Completion |
66 |
> |
* but doing so requires three further considerations: (1) Completion |
67 |
|
* of few if any <em>other</em> tasks should be dependent on a task |
68 |
|
* that blocks on external synchronization or I/O. Event-style async |
69 |
|
* tasks that are never joined (for example, those subclassing {@link |
1343 |
|
public final void setRawResult(T v) { result = v; } |
1344 |
|
public final boolean exec() { runnable.run(); return true; } |
1345 |
|
public final void run() { invoke(); } |
1346 |
+ |
public String toString() { |
1347 |
+ |
return super.toString() + "[Wrapped task = " + runnable + "]"; |
1348 |
+ |
} |
1349 |
|
private static final long serialVersionUID = 5232453952276885070L; |
1350 |
|
} |
1351 |
|
|
1363 |
|
public final void setRawResult(Void v) { } |
1364 |
|
public final boolean exec() { runnable.run(); return true; } |
1365 |
|
public final void run() { invoke(); } |
1366 |
+ |
public String toString() { |
1367 |
+ |
return super.toString() + "[Wrapped task = " + runnable + "]"; |
1368 |
+ |
} |
1369 |
|
private static final long serialVersionUID = 5232453952276885070L; |
1370 |
|
} |
1371 |
|
|
1411 |
|
} |
1412 |
|
} |
1413 |
|
public final void run() { invoke(); } |
1414 |
+ |
public String toString() { |
1415 |
+ |
return super.toString() + "[Wrapped task = " + callable + "]"; |
1416 |
+ |
} |
1417 |
|
private static final long serialVersionUID = 2838392045355241008L; |
1418 |
|
} |
1419 |
|
|