in cxx/fbjni/detail/Environment.cpp [157:170]
inline void setTLData(tls_key_t key, detail::TLData* data) {
#ifndef _WIN32
int ret = pthread_setspecific(key, data);
if (ret != 0) {
(void) ret;
FBJNI_LOGF("pthread_setspecific failed: %d", ret);
}
#else
BOOL ret = TlsSetValue(key, data);
if (!ret) {
FBJNI_LOGF("TlsSetValue failed: %d", GetLastError());
}
#endif
}