Fix SingletonThreadLocal
authorPavlo Kushnir <pavlo@fb.com>
Mon, 29 Feb 2016 20:02:27 +0000 (12:02 -0800)
committerFacebook Github Bot 7 <facebook-github-bot-7-bot@fb.com>
Mon, 29 Feb 2016 20:05:51 +0000 (12:05 -0800)
Summary: it's really thread local at this point :)

Reviewed By: jmswen

Differential Revision: D2989668

fb-gh-sync-id: 423b9214922c92318181a62c583f58cd204b52e3
shipit-source-id: 423b9214922c92318181a62c583f58cd204b52e3

folly/SingletonThreadLocal.h

index e073fecd2d2f303817fa82daaaec60c945bd5cc4..f3b6296cd9b6ec715409144e85d9e482c95a9944 100644 (file)
@@ -38,7 +38,6 @@ class SingletonThreadLocal {
 
   static T& get() {
 #ifdef FOLLY_TLS
-    *localPtr() = nullptr;
     if (UNLIKELY(*localPtr() == nullptr)) {
       *localPtr() = &(**SingletonT::get());
     }