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 2021/11/16 21:36:04 UTC

[GitHub] [incubator-brpc] zyearn commented on a change in pull request #1559: Update doc of client/server/error_code/status/cpu_profiler/bthread_id

zyearn commented on a change in pull request #1559:
URL: https://github.com/apache/incubator-brpc/pull/1559#discussion_r750680063



##########
File path: docs/cn/client.md
##########
@@ -299,7 +311,11 @@ if (cntl->Failed()) {
 
 你可以独立地创建这些对象,并使用[NewCallback](#使用NewCallback)生成done,也可以把Response和Controller作为done的成员变量,[一起new出来](#继承google::protobuf::Closure),一般使用前一种方法。
 
-**发起异步请求后Request和Channel也可以立刻析构**。这两样和response/controller是不同的。注意:这是说Channel的析构可以立刻发生在CallMethod**之后**,并不是说析构可以和CallMethod同时发生,删除正被另一个线程使用的Channel是未定义行为(很可能crash)。
+发起异步请求后Request可以立刻析构。(SelectiveChannel是个例外,SelectiveChannel情况下必须在请求处理完成后再释放request对象)
+
+发起异步请求后(CallMethod之后),不建议立即析构Channel。(由于brpc当前实现的[一个bug](https://github.com/apache/incubator-brpc/issues/658),在异步请求结束前析构Channel有小概率crash)

Review comment:
       这个issue的上下文比较少不能判断是不是同样的场景(在CallMethod后析构Channel),所以这里文档可以暂时不提?




-- 
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: dev-unsubscribe@brpc.apache.org

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