Use singleton EventBasePool in ServiceRouter
authorAndrii Grynenko <andrii@fb.com>
Thu, 1 Dec 2016 01:59:58 +0000 (17:59 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Thu, 1 Dec 2016 02:08:46 +0000 (18:08 -0800)
commit930da0547264c17739050ec0e9fad39887e78bab
tree5ff38341e9ba299dca586b6b361500f418a793fc
parent895c8a62d25a854afc1cbf9d1f6fba97ba1b9d83
Use singleton EventBasePool in ServiceRouter

Summary:
Switching ServiceRouter code to use VirtualEventBase instead of EventBase allows us to have same thread-pool shared between multiple ServiceRouter instances.

In future this allows us to replace EventBasePoolImpl with some generic thread-pool implementation (e.g. IOThreadPoolExecutor). It also makes it trivial to have ServiceRouter run on a any existing thread-pool if necessary.

Reviewed By: smichelson

Differential Revision: D3935283

fbshipit-source-id: 3275bbace15a0df8b06d12c970ccc098a631658d
folly/io/async/VirtualEventBase.h