| 555 | |
| 556 | template <class T> |
| 557 | void sendResult(ReplyPromise<T>& reply, Optional<ErrorOr<T>> const& result) { |
| 558 | auto& res = result.get(); |
| 559 | if (res.isError()) |
| 560 | reply.sendError(res.getError()); |
| 561 | else |
| 562 | reply.send(res.get()); |
| 563 | } |
| 564 | |
| 565 | ACTOR Future<Void> runWorkloadAsync(Database cx, |
| 566 | WorkloadInterface workIface, |