xinyiZzz edited a comment on pull request #7911:
URL: https://github.com/apache/incubator-doris/pull/7911#issuecomment-1023917862


   > > Regarding the second point, do you mean changing the thread_local 
variable to a member variable of the class? For example, abstract a parent 
class to save this variable. or other meanings.
   > 
   > You can redesign the implementation of your thread_local structs to have 
trivial destructor. The definition is in 
https://en.cppreference.com/w/cpp/language/destructor .
   
   I think I understand trivial destructor,
   For non-trivial variables in thread_local, such as std::string, I plan to 
store them as pointers.
   To ensure that thread_local is trivial, these non-trivial pointers will 
uniformly call destructors elsewhere. 
   And try to use POD type.
   
   thanks again, very helpful @amosbird 


-- 
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: commits-unsubscr...@doris.apache.org

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



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

Reply via email to