chenBright commented on code in PR #2934: URL: https://github.com/apache/brpc/pull/2934#discussion_r2029022059
########## src/bthread/task_group.cpp: ########## @@ -372,11 +372,12 @@ void TaskGroup::task_runner(intptr_t skip_remained) { // Clean tls variables, must be done before changing version_butex // otherwise another thread just joined this thread may not see side // effects of destructing tls variables. - KeyTable* kt = tls_bls.keytable; + LocalStorage* tls_bls_ptr = BAIDU_GET_PTR_VOLATILE_THREAD_LOCAL(tls_bls); + KeyTable* kt = tls_bls_ptr->keytable; if (kt != NULL) { return_keytable(m->attr.keytable_pool, kt); // After deletion: tls may be set during deletion. - tls_bls.keytable = NULL; + tls_bls_ptr->keytable = NULL; Review Comment: return_keytable的时候,bthread有可能会挂起,tls_bls_ptr应该得重新取值吧? -- 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