zyearn commented on code in PR #1817:
URL: https://github.com/apache/incubator-brpc/pull/1817#discussion_r928310515
##########
src/brpc/socket.h:
##########
@@ -797,9 +805,17 @@ friend void DereferenceSocket(Socket*);
// Set by SetLogOff
butil::atomic<bool> _logoff_flag;
- // Flag used to mark whether additional reference has been decreased
- // by either `SetFailed' or `SetRecycle'
- butil::atomic<bool> _recycle_flag;
+ enum AdditionalRefStatus {
+ REF_USING, // socket is normal
+ REF_REVIVING, // socket is reviving
+ REF_RECYCLED // socket has been recycled
Review Comment:
在brpc里socket recycle的意思是归还到resource pool里,注释写的是“socket has been
recycled”,而实际可能并没有,用原来的注释更清楚一些。
--
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]