asio-grpc v3.4.0
Asynchronous gRPC with Asio/unified executors
|
ServerRPC NotifyWhenDone base. More...
#include <agrpc/detail/server_rpc_notify_when_done_mixin.hpp>
Public Types | |
using | executor_type = Executor |
The executor type. | |
Public Member Functions | |
bool | is_done () const noexcept |
Is this rpc done? | |
template<class CompletionToken = detail::DefaultCompletionTokenT<Executor>> | |
auto | wait_for_done (CompletionToken &&token=detail::DefaultCompletionTokenT< Executor >{}) |
Wait for done. | |
const executor_type & | get_executor () const noexcept |
Get the executor. | |
const executor_type & | get_scheduler () const noexcept |
Get the scheduler. | |
auto & | context () |
Get the underlying ServerContext | |
const auto & | context () const |
Get the underlying ServerContext (const overload) | |
void | cancel () noexcept |
Cancel this RPC. | |
ServerRPC NotifyWhenDone base.
|
inlinenodiscardnoexcept |
Is this rpc done?
Only available if Traits
contain NOTIFY_WHEN_DONE = true
.
Returns true if NotifyWhenDone has fired which indicates that finish()
has been called or that the rpc is dead (i.e., canceled, deadline expired, other side dropped the channel, etc).
Thread-safe
|
inline |
Wait for done.
Only available if Traits
contain NOTIFY_WHEN_DONE = true
.
Request notification of the completion of this rpc, either due to calling finish()
or because the rpc is dead (i.e., canceled, deadline expired, other side dropped the channel, etc). rpc.context().IsCancelled() may only be called after this operation completes.
Cancelling this operation does not invoke grpc::ServerContext::TryCancel.
Internally, this operation uses grpc::ServerContext::AsyncNotifyWhenDone.
wait_for_done()
may be outstanding at a time.token | A completion token like asio::yield_context or agrpc::use_sender . The completion signature is void() . |
|
inlinenodiscardnoexceptinherited |
Get the executor.
Thread-safe
|
inlinenodiscardnoexceptinherited |
Get the scheduler.
Thread-safe
|
inlinenoexceptinherited |