I was surprised to see that gmtime_r is calling tz-anything really. I figure the reason there is a localtime vs gmtime is taht the former does tz conversions whereas the latter need not. Looks like gmtime calls __tz_convert though, which then goes ahead and grabs a global lock on the tz ( which dont even really need ... right? ) Am I missing something here? How can I get efficient conversion of epoch -> struct tm in a multithreaded application?
(gdb) where
#0 0x00007fffee255eec in __lll_lock_wait_private () from /lib64/libc.so.6
#1 0x00007fffee2007bc in _L_lock_2546 () from /lib64/libc.so.6
#2 0x00007fffee2005f7 in __tz_convert () from /lib64/libc.so.6
#3 0x000000000041c63f in DateTimeEx (dt=..., this=0x7fffca551900) at /var/lib/jenkins/workspace/hfalgo_src_hotfix_1.69.1-T6J4HNFQDMYVEKV4MEGVD6UCCPG7KHWQDOSVYBUDROFXZA6YINSA/hfalgo_src/./core/Time.h:81