VirtualEventBase
authorAndrii Grynenko <andrii@fb.com>
Thu, 17 Nov 2016 20:44:52 +0000 (12:44 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Thu, 17 Nov 2016 20:53:29 +0000 (12:53 -0800)
commitb981b9f2dbaa2082f3e4794d08d3f57afc4237b4
tree3103b2360fa06aab26566fa64687bf3bfb83ce28
parent0bf2bc290b27e5567fcd5d23d02dd6a5c24dcb64
VirtualEventBase

Summary:
This implements a view onto an EventBase, which can keep track of all tasks created through it and join them on destruction. Multiple VirtualEventBases can be backed by the same EventBase. This can be useful to have the same IO thread/thread-pool be shared between multiple libraries, allowing them to each have it's own VirtualEventBase and control its lifetime.

Since VirtualEventBase also supports LoopKeepAlive and onDestruction functionality, it can be easily integrated with FiberManagerMap.

Reviewed By: yfeldblum

Differential Revision: D4158719

fbshipit-source-id: 7df964f36e5276e2b5665fd8394ea2e187aa298c
folly/Makefile.am
folly/fibers/EventBaseLoopController-inl.h
folly/fibers/EventBaseLoopController.h
folly/fibers/FiberManagerMap.cpp
folly/fibers/FiberManagerMap.h
folly/fibers/test/FibersTest.cpp
folly/io/async/EventBase.h
folly/io/async/VirtualEventBase.cpp [new file with mode: 0644]
folly/io/async/VirtualEventBase.h [new file with mode: 0644]