@ -19,6 +19,7 @@
# define GRPCPP_IMPL_SERVER_CALLBACK_HANDLERS_H
# define GRPCPP_IMPL_SERVER_CALLBACK_HANDLERS_H
# include <grpc/grpc.h>
# include <grpc/grpc.h>
# include <grpc/impl/call.h>
# include <grpc/support/log.h>
# include <grpc/support/log.h>
# include <grpcpp/impl/rpc_service_method.h>
# include <grpcpp/impl/rpc_service_method.h>
# include <grpcpp/server_context.h>
# include <grpcpp/server_context.h>
@ -186,6 +187,8 @@ class CallbackUnaryHandler : public grpc::internal::MethodHandler {
ctx_ - > set_message_allocator_state ( allocator_state ) ;
ctx_ - > set_message_allocator_state ( allocator_state ) ;
}
}
grpc_call * call ( ) override { return call_ . call ( ) ; }
/// SetupReactor binds the reactor (which also releases any queued
/// SetupReactor binds the reactor (which also releases any queued
/// operations), maybe calls OnCancel if possible/needed, and maybe marks
/// operations), maybe calls OnCancel if possible/needed, and maybe marks
/// the completion of the RPC. This should be the last component of the
/// the completion of the RPC. This should be the last component of the
@ -370,6 +373,8 @@ class CallbackClientStreamingHandler : public grpc::internal::MethodHandler {
std : : function < void ( ) > call_requester )
std : : function < void ( ) > call_requester )
: ctx_ ( ctx ) , call_ ( * call ) , call_requester_ ( std : : move ( call_requester ) ) { }
: ctx_ ( ctx ) , call_ ( * call ) , call_requester_ ( std : : move ( call_requester ) ) { }
grpc_call * call ( ) override { return call_ . call ( ) ; }
void SetupReactor ( ServerReadReactor < RequestType > * reactor ) {
void SetupReactor ( ServerReadReactor < RequestType > * reactor ) {
reactor_ . store ( reactor , std : : memory_order_relaxed ) ;
reactor_ . store ( reactor , std : : memory_order_relaxed ) ;
// The callback for this function should not be inlined because it invokes
// The callback for this function should not be inlined because it invokes
@ -595,6 +600,8 @@ class CallbackServerStreamingHandler : public grpc::internal::MethodHandler {
req_ ( req ) ,
req_ ( req ) ,
call_requester_ ( std : : move ( call_requester ) ) { }
call_requester_ ( std : : move ( call_requester ) ) { }
grpc_call * call ( ) override { return call_ . call ( ) ; }
void SetupReactor ( ServerWriteReactor < ResponseType > * reactor ) {
void SetupReactor ( ServerWriteReactor < ResponseType > * reactor ) {
reactor_ . store ( reactor , std : : memory_order_relaxed ) ;
reactor_ . store ( reactor , std : : memory_order_relaxed ) ;
// The callback for this function should not be inlined because it invokes
// The callback for this function should not be inlined because it invokes
@ -807,6 +814,8 @@ class CallbackBidiHandler : public grpc::internal::MethodHandler {
std : : function < void ( ) > call_requester )
std : : function < void ( ) > call_requester )
: ctx_ ( ctx ) , call_ ( * call ) , call_requester_ ( std : : move ( call_requester ) ) { }
: ctx_ ( ctx ) , call_ ( * call ) , call_requester_ ( std : : move ( call_requester ) ) { }
grpc_call * call ( ) override { return call_ . call ( ) ; }
void SetupReactor ( ServerBidiReactor < RequestType , ResponseType > * reactor ) {
void SetupReactor ( ServerBidiReactor < RequestType , ResponseType > * reactor ) {
reactor_ . store ( reactor , std : : memory_order_relaxed ) ;
reactor_ . store ( reactor , std : : memory_order_relaxed ) ;
// The callbacks for these functions should not be inlined because they
// The callbacks for these functions should not be inlined because they