3#include <grpcpp/server_context.h>
5#include <userver/engine/single_use_event.hpp>
6#include <userver/engine/task/cancel.hpp>
7#include <userver/ugrpc/impl/async_method_invocation.hpp>
11namespace ugrpc::
server::impl {
13class RpcFinishedEvent
final :
public ugrpc::impl::EventBase {
15 RpcFinishedEvent(engine::TaskCancellationToken cancellation_token,
16 grpc::ServerContext& server_ctx)
noexcept;
18 RpcFinishedEvent(
const RpcFinishedEvent&) =
delete;
19 RpcFinishedEvent& operator=(
const RpcFinishedEvent&) =
delete;
20 RpcFinishedEvent(RpcFinishedEvent&&) =
delete;
21 RpcFinishedEvent& operator=(RpcFinishedEvent&&) =
delete;
23 void* GetTag()
noexcept;
26 void Notify(
bool ok)
noexcept override;
32 engine::TaskCancellationToken cancellation_token_;
33 grpc::ServerContext& server_ctx_;
34 engine::SingleUseEvent event_;
37ugrpc::impl::AsyncMethodInvocation::WaitStatus Wait(
38 ugrpc::impl::AsyncMethodInvocation& async);