| 20 | } |
| 21 | |
| 22 | static AwaitTask deadlineWorkflow(AwaitEventLoop& await, AwaitTimeoutResult& timeout) |
| 23 | { |
| 24 | AwaitTask child = slowOperation(await); |
| 25 | SC_CO_TRY(await.spawn(child)); |
| 26 | |
| 27 | Result waitResult = co_await await.waitFor(child, {1}, &timeout); |
| 28 | if (waitResult or not timeout.timedOut or not child.isCompleted() or not AwaitIsCancelled(child.result())) |
| 29 | { |
| 30 | co_return Result::Error("AwaitDeadline expected timeout cancellation"); |
| 31 | } |
| 32 | |
| 33 | co_return Result(true); |
| 34 | } |
| 35 | |
| 36 | static Result runAwaitDeadline() |
| 37 | { |
no test coverage detected