projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
787e185
)
Fix SIOF in folly/io/async/Request.cpp
author
Andrii Grynenko
<andrii@fb.com>
Tue, 23 Feb 2016 22:56:29 +0000
(14:56 -0800)
committer
facebook-github-bot-0
<folly-bot@fb.com>
Tue, 23 Feb 2016 23:20:25 +0000
(15:20 -0800)
Summary: Use Meyers singleton instead.
Reviewed By: afrind
Differential Revision:
D2963282
fb-gh-sync-id:
7aec36e7cc3b0ab09b2b093202f40d5b0d399f4d
shipit-source-id:
7aec36e7cc3b0ab09b2b093202f40d5b0d399f4d
folly/io/async/Request.cpp
patch
|
blob
|
history
diff --git
a/folly/io/async/Request.cpp
b/folly/io/async/Request.cpp
index 7a048a35e4ef2f94c5649252d4b75d9fe2048ce2..d2d17ca7d83cd344c8821ee4411ab9685dc3e5a5 100644
(file)
--- a/
folly/io/async/Request.cpp
+++ b/
folly/io/async/Request.cpp
@@
-22,13
+22,10
@@
namespace folly {
-namespace {
-
-using SingletonT = SingletonThreadLocal<std::shared_ptr<RequestContext>>;
-SingletonT singleton;
-}
-
std::shared_ptr<RequestContext>& RequestContext::getStaticContext() {
+ using SingletonT = SingletonThreadLocal<std::shared_ptr<RequestContext>>;
+ static SingletonT singleton;
+
return singleton.get();
}
}