Give each eventbase a wheeltimer
authorScott Michelson <sdmich@fb.com>
Thu, 30 Jun 2016 00:57:13 +0000 (17:57 -0700)
committerFacebook Github Bot 4 <facebook-github-bot-4-bot@fb.com>
Thu, 30 Jun 2016 01:08:25 +0000 (18:08 -0700)
commit75e5507cbfe7ef5a448375e9908e10864b506b05
tree3d6a657af676e7e9ae45833876e8dfe04d2c4634
parente6aa2684a75a8c3077a763fca674a79bb61b47ad
Give each eventbase a wheeltimer

Summary:
This gives each eventbase a wheeltimer. Construction is on demand, so there's no penalty if it isn't used. Why do this? 3 immediate reasons:

1) some clients already do this outside of the interface: diffusion/FBS/browse/master/fbcode/servicerouter/client/common/ThriftDispatcher.h$302,607?view=highlighted
2) inefficient timers can be easily avoided: diffusion/FBS/browse/master/fbcode/thrift/lib/cpp2/async/HeaderClientChannel.h;64fb260ea4bd235ba79414a78002fd68cf0453a8$319
3) D2379210 indicates we can do a better job with this than cob timeout

Reviewed By: andriigrynenko, djwatson

Differential Revision: D3460792

fbshipit-source-id: a7bb6fdd90ca95b6aef8af952d7a66dd0dc260c1
folly/io/async/EventBase.h
folly/io/async/test/HHWheelTimerTest.cpp