asio-grpc v3.1.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? More... | |
template<class CompletionToken = detail::DefaultCompletionTokenT<Executor>> | |
auto | wait_for_done (CompletionToken &&token=detail::DefaultCompletionTokenT< Executor >{}) |
Wait for done. More... | |
const executor_type & | get_executor () const noexcept |
Get the executor. More... | |
const executor_type & | get_scheduler () const noexcept |
Get the scheduler. More... | |
auto & | context () |
Get the underlying ServerContext | |
const auto & | context () const |
Get the underlying ServerContext (const overload) | |
void | cancel () noexcept |
Cancel this RPC. More... | |
ServerRPC NotifyWhenDone base.
|
inlinenoexcept |
Is this rpc done?
Only available if Traits
contain NOTIFY_WHEN_DONE = true
.
Returns true if NotifyWhenDone has fired which indicates the 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.
token | A completion token like asio::yield_context or agrpc::use_sender . The completion signature is void() . |
|
inlinenoexceptinherited |
Get the executor.
Thread-safe
|
inlinenoexceptinherited |
Get the scheduler.
Thread-safe
|
inlinenoexceptinherited |