[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-20 Thread jpeach
Github user jpeach commented on the issue: https://github.com/apache/trafficserver/pull/815 👍 --- 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

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-20 Thread atsci
Github user atsci commented on the issue: https://github.com/apache/trafficserver/pull/815 Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/358/ for details. --- If your project is set up for it, you can reply to this email and have your

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-20 Thread atsci
Github user atsci commented on the issue: https://github.com/apache/trafficserver/pull/815 FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/462/ for details. --- If your project is set up for it, you can reply to this email and have your

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-20 Thread zwoop
Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/815 Yeah, like that. Makes you wonder why TSPluginDirGet() was so different though ... I've had issues before with these APIs, where transfer of ownership was not clear. I'll take a peek in a bit.

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread yatsukhnenko
Github user yatsukhnenko commented on the issue: https://github.com/apache/trafficserver/pull/815 @zwoop, @jpeach, something like this? --- 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

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread zwoop
Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/815 Gotcha. Well, you showed me C++11 has this requirement for thread safety, and we've said that v7.0.0 will require C++11 support, so +1 on that. --- If your project is set up for it, you can

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread jpeach
Github user jpeach commented on the issue: https://github.com/apache/trafficserver/pull/815 File scope would not work since these initializers can depend on librecords. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread zwoop
Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/815 If I understand C++ at all, I don't think that example is thread safe? But, moving it outside (file scope) would be. No? --- If your project is set up for it, you can reply to this email and

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread zwoop
Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/815 Interesting, so e.g. static char *runtimedir = RecConfigReadRuntimeDir(); would be thread safe. That seems like a no-brainer to me :). +1 --- If your project is set

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread jpeach
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

[GitHub] trafficserver issue #815: TS-4680: thread safe initialization in TS*DirGet()...

2016-07-19 Thread zwoop
Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/815 @jpeach Wdyt? Would TLS make more sense here? It would duplicate those static strings, but avoids locks, no ? --- If your project is set up for it, you can reply to this email and have your