From: Pavlo Kushnir Date: Mon, 29 Feb 2016 20:02:27 +0000 (-0800) Subject: Fix SingletonThreadLocal X-Git-Tag: deprecate-dynamic-initializer~32 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8edf04da5cc42f5d417af9c4e489e9769f5d7927;p=folly.git Fix SingletonThreadLocal Summary: it's really thread local at this point :) Reviewed By: jmswen Differential Revision: D2989668 fb-gh-sync-id: 423b9214922c92318181a62c583f58cd204b52e3 shipit-source-id: 423b9214922c92318181a62c583f58cd204b52e3 --- diff --git a/folly/SingletonThreadLocal.h b/folly/SingletonThreadLocal.h index e073fecd..f3b6296c 100644 --- a/folly/SingletonThreadLocal.h +++ b/folly/SingletonThreadLocal.h @@ -38,7 +38,6 @@ class SingletonThreadLocal { static T& get() { #ifdef FOLLY_TLS - *localPtr() = nullptr; if (UNLIKELY(*localPtr() == nullptr)) { *localPtr() = &(**SingletonT::get()); }