fix folly::FunctionScheduler.cancelFunctionAndWait() hanging issue
[folly.git] / folly / experimental / RCUUtils.h
index 4bf85e1a6f6da0899e46792a8628d2e5b2cea255..9e9cb6c8d8c729cf5aa32cd0466e38fc66cea349 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,12 +30,7 @@ bool RCURegisterThread();
 
 class RCUReadLock {
  public:
-  static RCUReadLock& instance() {
-    // Both lock and unlock are static, so no need to worry about destruction
-    // order
-    static RCUReadLock instance;
-    return instance;
-  }
+  static RCUReadLock& instance();
 
   static void lock() {
     assert(RCURegisterThread() == false);