jpeach commented on PR #10150: URL: https://github.com/apache/trafficserver/pull/10150#issuecomment-1666669055
> > Using two thread locals avoids the deadlock because without the thread local object access, `get_jit_stack` doesn't call the TLS init function which ends up calling __cxx_thread_atexit(which locks the dl_whatever mutex). Since the raw pointer doesn't have a destructor to call, it doesn't need to call this. Interestingly, `get_jit_stack` was calling the TLS init function to setup the destructor call at thread exit whether or not the class was declared in the function body. > > So really it was the destructor that was causing this. > > I like this solution better than the other one. 👍 Thanks! Can you please add this explanation in a code comment to make it easier for future maintainers to understand this change? -- 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]
