()
| 532 | } |
| 533 | |
| 534 | private void runContinuations() { |
| 535 | synchronized (lock) { |
| 536 | for (Continuation<TResult, ?> continuation : continuations) { |
| 537 | try { |
| 538 | continuation.then(this); |
| 539 | } catch (RuntimeException e) { |
| 540 | throw e; |
| 541 | } catch (Exception e) { |
| 542 | throw new RuntimeException(e); |
| 543 | } |
| 544 | } |
| 545 | continuations = null; |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | /** |
| 550 | * Allows safe orchestration of a task's completion, preventing the consumer from prematurely |
no test coverage detected