wwbmmm commented on issue #1693:
URL: 
https://github.com/apache/incubator-brpc/issues/1693#issuecomment-1138074480

   > 2\. 作为一个临时方案,定义一个 bthread_errno() 或 brpc_errno(),比简单粗暴的禁止 **const** 
优化优雅,也易于让人接受。
   
   这个方案在 
https://github.com/apache/incubator-brpc/blob/master/src/bthread/errno.h 
已经实现了。问题在于,不只是brpc自身代码在使用errno时需要include "bthread/errno.h", 
用户代码里也要加,包括用户通过第三方库间接使用到errno的情况。除了errno,还有pthread_self等函数也需要处理,这样搞很容易疏漏,导致未定义的行为,而且难以追查。
   
   给glibc报bug的方案,我再看看


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

Reply via email to