Go to the documentation of this file.
32 #ifndef GRPCPP_IMPL_CODEGEN_COMPLETION_QUEUE_H
33 #define GRPCPP_IMPL_CODEGEN_COMPLETION_QUEUE_H
55 template <
class W,
class R>
56 class ClientReaderWriter;
62 template <
class W,
class R>
65 template <
class ResponseType>
70 class BaseRequestType,
class BaseResponseType>
72 template <
class ServiceType,
class RequestType,
class ResponseType>
74 template <
class ServiceType,
class RequestType,
class ResponseType>
76 template <
class Streamer,
bool WriteNeeded>
78 template <grpc::StatusCode code>
92 template <
class InputMessage,
class OutputMessage>
94 template <
class Op1,
class Op2,
class Op3,
class Op4,
class Op5,
class Op6>
201 template <
typename T>
221 template <
typename T,
typename F>
257 &attributes,
nullptr);
273 template <
class W,
class R>
279 template <
class W,
class R>
281 template <
class ResponseType>
285 template <
class ServiceType,
class RequestType,
class ResponseType>
287 template <
class ServiceType,
class RequestType,
class ResponseType>
289 template <
class Streamer,
bool WriteNeeded>
291 template <grpc::StatusCode code>
295 template <
class InputMessage,
class OutputMessage>
302 template <
class Op1,
class Op2,
class Op3,
class Op4,
class Op5,
class Op6>
329 cq_,
tag, deadline,
nullptr);
330 bool ok = ev.success != 0;
332 if (
tag->FinalizeResult(&ignored, &
ok)) {
351 cq_,
tag, deadline,
nullptr);
353 bool ok = ev.success != 0;
367 cq_,
tag, deadline,
nullptr);
372 bool ok = ev.success != 0;
392 static_cast<gpr_atm>(-1)) == 1) {
430 std::list<const grpc::Server*>
466 #endif // GRPCPP_IMPL_CODEGEN_COMPLETION_QUEUE_H
void TryPluck(grpc::internal::CompletionQueueTag *tag)
@ SHUTDOWN
The completion queue has been shutdown and fully-drained.
void RegisterAvalanching()
CompletionQueueTLSCache(CompletionQueue *cq)
void CompleteAvalanching()
virtual void grpc_completion_queue_shutdown(grpc_completion_queue *cq)=0
CompletionQueue(const grpc_completion_queue_attributes &attributes)
Private constructor of CompletionQueue only visible to friend classes.
grpc_cq_polling_type polling_type_
virtual gpr_timespec gpr_inf_future(gpr_clock_type type)=0
NextStatus
Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT.
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type)
~CompletionQueue() override
Destructor. Destroys the owned wrapped completion queue / instance.
void TryPluck(grpc::internal::CompletionQueueTag *tag, gpr_timespec deadline)
A wrapper class of an application provided rpc method handler.
Classes that require gRPC to be initialized should inherit from this class.
std::list< const grpc::Server * > server_list_
Channels represent a connection to an endpoint. Created by CreateChannel.
#define T(upbtypeconst, upbtype, ctype, default_value)
NextStatus AsyncNext(void **tag, bool *ok, const T &deadline)
bool Pluck(grpc::internal::CompletionQueueTag *tag)
CoreCodegenInterface * g_core_codegen_interface
Codegen interface for grpc::Channel.
grpc_completion_queue * cq_
grpc_completion_queue * cq()
@ GRPC_CQ_DEFAULT_POLLING
Base class of ServerContext.
Descriptor of an RPC method.
static void * tag(intptr_t t)
static void ReleaseCallbackAlternativeCQ(CompletionQueue *cq)
void RegisterServer(const grpc::Server *server)
A builder class for the creation and startup of grpc::Server instances.
const GRPCAPI grpc_completion_queue_factory * grpc_completion_queue_factory_lookup(const grpc_completion_queue_attributes *attributes)
void UnregisterServer(const grpc::Server *server)
virtual void grpc_completion_queue_destroy(grpc_completion_queue *cq)=0
static CompletionQueue * CallbackAlternativeCQ()
bool IsFrequentlyPolled()
#define gpr_atm_rel_store(p, value)
#define gpr_atm_no_barrier_fetch_add(p, delta)
grpc::internal::Mutex server_list_mutex_
gpr_atm avalanches_in_flight_
static void shutdown_cb(uv_shutdown_t *req, int status)
bool Next(void **tag, bool *ok)
virtual grpc_completion_queue * grpc_completion_queue_create(const grpc_completion_queue_factory *factory, const grpc_completion_queue_attributes *attributes, void *reserved)=0
#define GRPC_CQ_CURRENT_VERSION
~CompletionQueueTLSCache()
virtual gpr_timespec gpr_time_0(gpr_clock_type type)=0
bool ServerListEmpty() const
bool Flush(void **tag, bool *ok)
@ TIMEOUT
deadline was reached.
void InitialAvalanching()
NextStatus DoThenAsyncNext(F &&f, void **tag, bool *ok, const T &deadline)
ServerCompletionQueue(grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type, grpc_completion_queue_functor *shutdown_cb)
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
ServerCompletionQueue()
Default constructor.
An interface allowing implementors to process and filter event tags.
gpr_timespec raw_time()=delete
A wrapper class of an application provided server streaming handler.
NextStatus AsyncNextInternal(void **tag, bool *ok, gpr_timespec deadline)
A wrapper class of an application provided client streaming handler.
void UnaryRunHandlerHelper(const grpc::internal::MethodHandler::HandlerParameter &, ResponseType *, grpc::Status &)
virtual grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved)=0
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:52