You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/12/27 05:55:22 UTC

[GitHub] [incubator-brpc] guodongxiaren opened a new issue #1315: 有没有办法由使用方控制request和response的析构时机

guodongxiaren opened a new issue #1315:
URL: https://github.com/apache/incubator-brpc/issues/1315


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   brpc在我们调用了done->Run()之后。会立即给客户端返回response,同时request和response会析构。
   
   request或response比较大。
   
   我想在返回response之后,利用request和response打印到本地日志(或远程日志)中。目前看来这个操作只能在调用done->Run()之前做。这个日志打印的开销(涉及序列化开销)会包含在一次请求响应的时间内。
   
   或者在调用done->Run()之前,给request和response 拷贝到新的变量中(比如CopyFrom)。然后在done->Run()之后用新的变量再做日志打印。在一次请求响应的时间内包含CopyFrom的开销。
   
   我想能不能在done->Run()只返回,但是request和response不析构呢?我们使用完再,自己调用方法析构掉。
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org