Github user jpeach commented on the issue:

    https://github.com/apache/trafficserver/pull/815
  
    These are globals, so I don't think that thread local storage makes sense 
here.
    
    There are 2 reasonable approaches to this. The most straight-forward is to 
use static initialization (which is guaranteed to be thread-safe by the 
[language](http://en.cppreference.com/w/cpp/language/storage_duration)). 
Alternatively, we could use ``pthread_once`` directly.
    
    For example, using the first alternative:
    ```C
    const char *
    TSFooDirGet()
    {
        static const char * path = ReadFooDirPath();
        return path;
    }
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to