chenBright commented on code in PR #3309:
URL: https://github.com/apache/brpc/pull/3309#discussion_r3308815281
##########
src/brpc/controller.cpp:
##########
@@ -1593,6 +1595,12 @@ int Controller::GetSockOption(int level, int optname,
void* optval, socklen_t* o
}
}
+void Controller::set_after_rpc_resp_fn(AfterRpcRespFnType&& fn) {
+ _after_rpc_resp_fn = fn;
+ // Set the flag from global gflag when after_rpc_resp_fn is set
+ _concurrency_remover_manages_after_rpc_resp =
FLAGS_concurrency_remover_manages_after_rpc_resp;
Review Comment:
Do not rely on gflag, but rely on the Controller's _flags.
https://github.com/apache/brpc/blob/f97f23edbaf3f47e25dc925a947b15b45810276a/src/brpc/controller.h#L808
https://github.com/apache/brpc/blob/f97f23edbaf3f47e25dc925a947b15b45810276a/src/brpc/controller.h#L133-L154
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]