| 529 | // OpSrv::ServeOn implementation |
| 530 | template <class Q, class P, concepts::SupportedServer<Q, P> TServer> |
| 531 | void OpSrv::ServeOn(const res::Service<Q, P>& srv, aimrt::executor::ExecutorRef exe, TServer server) { |
| 532 | auto& rpc_ctx = ctx_.GetRpcResource(srv, loc_); |
| 533 | |
| 534 | auto standardized_server = StandardizeServer<Q, P, TServer>(std::move(server)); |
| 535 | auto ctx_ptr = ctx_.shared_from_this(); |
| 536 | |
| 537 | rpc_ctx.serve_f = Context::Server<Q, P>( |
| 538 | [server_func = std::move(standardized_server), exe = std::move(exe), ctx_ptr]( |
| 539 | aimrt::rpc::ContextRef ctx, const Q& q, P& p) -> aimrt::co::Task<aimrt::rpc::Status> { |
| 540 | co_await aimrt::co::Schedule(aimrt::co::AimRTScheduler(exe)); |
| 541 | ctx_ptr->LetMe(); |
| 542 | co_return co_await server_func(ctx, q, p); |
| 543 | }); |
| 544 | } |
| 545 | |
| 546 | // OpSrv::Serving implementation |
| 547 | template <class Q, class P> |
no test coverage detected