Default VirtualEventBase
authorAndrii Grynenko <andrii@fb.com>
Wed, 8 Mar 2017 00:54:44 +0000 (16:54 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 8 Mar 2017 01:10:35 +0000 (17:10 -0800)
commitde821c225980359651a07b670174ae90d4f655c8
treeb92db1e5f7b5973d47679868becf1b3f93997893
parentd433d90ac346c56f7182bfa97c0e7819b7af5351
Default VirtualEventBase

Summary:
Make each EventBase have a defuault VirtualEventBase which is attached to it and is joined on destruction. Default VirtualEventBase is lazily created on first request.
This makes it trivial to use code switched to VirtualEventBase both with VirtualEventBase and EventBase.

Reviewed By: yfeldblum

Differential Revision: D4644639

fbshipit-source-id: cf28a3632463a1c61404c225ce1186f5a4a062a3
folly/fibers/test/FibersTest.cpp
folly/io/async/EventBase.cpp
folly/io/async/EventBase.h
folly/io/async/VirtualEventBase.cpp
folly/io/async/VirtualEventBase.h