Commit ba225d4b authored by Maged Michael's avatar Maged Michael Committed by Facebook Github Bot

RequestContext: Declare gflag, add folly_ prefix to gflag name

Summary:
Declare gflag to enable turning it on and off at run time.
Added folly_ prefix to gflag name to reduce name pollution.

Reviewed By: davidtgoldblatt

Differential Revision: D19144459

fbshipit-source-id: 1e82cb102e47fea856952d1e630c03baf38adf1d
parent 09634ef5
......@@ -23,10 +23,9 @@
#include <folly/MapUtil.h>
#include <folly/SingletonThreadLocal.h>
#include <folly/portability/GFlags.h>
DEFINE_bool(
reqctx_use_hazptr,
folly_reqctx_use_hazptr,
false,
"RequestContext implementation using hazard pointers");
......@@ -461,7 +460,7 @@ RequestContext::StateHazptr::Combined* RequestContext::StateHazptr::expand(
}
RequestContext::RequestContext()
: useHazptr_(FLAGS_reqctx_use_hazptr),
: useHazptr_(FLAGS_folly_reqctx_use_hazptr),
rootId_(reinterpret_cast<intptr_t>(this)) {}
RequestContext::RequestContext(const RequestContext& ctx, RootTag)
......
......@@ -18,6 +18,7 @@
#include <folly/Synchronized.h>
#include <folly/container/F14Map.h>
#include <folly/portability/GFlags.h>
#include <folly/sorted_vector_types.h>
#include <folly/synchronization/Hazptr.h>
......@@ -26,6 +27,8 @@
#include <mutex>
#include <string>
DECLARE_bool(folly_reqctx_use_hazptr);
namespace folly {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment