Clean up RequestContext
authorDave Watson <davejwatson@fb.com>
Thu, 6 Nov 2014 17:59:27 +0000 (09:59 -0800)
committerDave Watson <davejwatson@fb.com>
Wed, 19 Nov 2014 20:52:13 +0000 (12:52 -0800)
commit84e83ecc389494103b5970e33f0cbf75883bf42e
tree0fb2c69c363bd2fea9ba9e2c680040fc201668f1
parentfc7801ada9095c3181386b3e3dcdb60e4aaacfd2
Clean up RequestContext

Summary: Using a ThreadLocal cleans up the code quite a bit.  Also reuse the shared_ptr in create instead of creating a new one saves an allocation

Test Plan:
fbconfig thrift/lib/cpp/test:RequestContextTest; fbmake runtests

fbconfig common/services/cpp/test:trace_test; fbmake runtests

Reviewed By: hans@fb.com

Subscribers: trunkagent, doug, alandau, bmatheny, njormrod, mshneer, folly-diffs@, vloh

FB internal diff: D1663960

Signature: t1:1663960:1415390250:36d9b772016d2a12d804e98edbc1725af882e507
folly/io/async/Request.h