Replace RequestContext::setContext with RequestContextScopeGuard in folly
authorMirek Klimos <miro@fb.com>
Fri, 13 May 2016 19:02:35 +0000 (12:02 -0700)
committerFacebook Github Bot 6 <facebook-github-bot-6-bot@fb.com>
Fri, 13 May 2016 19:08:25 +0000 (12:08 -0700)
commit4d499e087e0445ff71a12eb1d5071cf33529d046
tree6554dfeb1fa68c8d350fb85e4088b983008bfcee
parent6da3b849193da48ae68bad4bab8dda171e0f1aaf
Replace RequestContext::setContext with RequestContextScopeGuard in folly

Summary: To make sure RequestContext is properly unset when we stop processing request on a thread. This changes the API in Fibers, NotificationQueue, HHWheelTimer and AsyncTimeout, and fixes RequestContext handling in Futures (reset RC after the callback is done)

Reviewed By: andriigrynenko

Differential Revision: D3279644

fbshipit-source-id: a6a1c2840cdce179334aa1a3b28fa514cd5358c1
folly/futures/detail/Core.h
folly/io/async/AsyncTimeout.cpp
folly/io/async/HHWheelTimer.cpp
folly/io/async/NotificationQueue.h