You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "yaocunhao (via GitHub)" <gi...@apache.org> on 2024/07/19 04:59:29 UTC

[I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

yaocunhao opened a new issue, #2703:
URL: https://github.com/apache/brpc/issues/2703

   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   glog 里面也使用了__thread,  为什么brpc能够兼容。  请问这里做了什么处理
   
   **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.

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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2703:
URL: https://github.com/apache/brpc/issues/2703#issuecomment-2241904579

   非brpc自身功能函数不会导致切换。


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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2703:
URL: https://github.com/apache/brpc/issues/2703#issuecomment-2241676352

   具体是什么兼容问题呢?


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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2703:
URL: https://github.com/apache/brpc/issues/2703#issuecomment-2241698919

   glog打日志的时候不会挂起协程,肯定都在同一个线程上的吧。


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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "yaocunhao (via GitHub)" <gi...@apache.org>.
yaocunhao closed issue #2703: glog 里面也使用了__thread,  为什么brpc能够兼容?
URL: https://github.com/apache/brpc/issues/2703


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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "yaocunhao (via GitHub)" <gi...@apache.org>.
yaocunhao commented on issue #2703:
URL: https://github.com/apache/brpc/issues/2703#issuecomment-2241701635

   > glog打日志的时候不会挂起协程,肯定都在同一个线程上的吧。
   
   明白了,感谢解答。 顺带请教下协程在那些情况下会切换线程。翻看了以的记录,得知协程会在rpc调用,以及brpc自身的一些挂起操作导致切换线程。想请教下除此之外,还会有其他的非brpc自身功能函数导致切换的情况么。


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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "yaocunhao (via GitHub)" <gi...@apache.org>.
yaocunhao commented on issue #2703:
URL: https://github.com/apache/brpc/issues/2703#issuecomment-2244091014

   > 非brpc自身功能函数不会挂起协程。
   
   感谢!!


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


Re: [I] glog 里面也使用了__thread, 为什么brpc能够兼容? (brpc)

Posted by "yaocunhao (via GitHub)" <gi...@apache.org>.
yaocunhao commented on issue #2703:
URL: https://github.com/apache/brpc/issues/2703#issuecomment-2241682037

   > 具体是什么兼容问题呢?
   
   文档里面不是说brpc不兼容线程本地变量么(切换走再切换回来,可能不再是同一个线程)。 glog里面用了本地线程变量缓存了当前线程的日志,所以想请教下这样为什么能够兼容


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