ehds commented on PR #2156:
URL: https://github.com/apache/brpc/pull/2156#issuecomment-1926276260

   > 感觉还是 thread_local 读写的问题, 请问下除了这个patch外,后面还有其他关于这个问题的修复吗? 目前去掉 
`src/bthread/task_group.cpp` 的lto后,可以正常工作。
   > 
   > task_runner 循环外的 tls,也加上 BAIDU_GET_VOLATILE_THREAD_LOCAL,后似乎问题不再出现了。
   > 
   > ```
   >  void TaskGroup::task_runner(intptr_t skip_remained) {
   >      // NOTE: tls_task_group is volatile since tasks are moved around
   >      //       different groups.
   > -    TaskGroup* g = tls_task_group;
   > +    TaskGroup* g = BAIDU_GET_VOLATILE_THREAD_LOCAL(tls_task_group);
   > ```
   
   https://github.com/apache/brpc/pull/2248


-- 
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-unsubscr...@brpc.apache.org

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


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

Reply via email to