Use VirtualEventBase in mcrouter
authorAndrii Grynenko <andrii@fb.com>
Fri, 10 Mar 2017 19:40:59 +0000 (11:40 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 10 Mar 2017 19:51:34 +0000 (11:51 -0800)
Summary:
This switches mcrouter to use VirtualEventBase as the unified way of managing its threads. This allows multiple mcrouters to be run on the same thread-pool, without having to keep separate shutdown logic.

As an immediate win - this eliminates any special shutdown logic from tcc and standalone mcrouter.

Reviewed By: jmswen

Differential Revision: D4570982

fbshipit-source-id: 3974279005150e3e1db16230fde6b5951ae016b9

folly/fibers/EventBaseLoopController.h

index f389a45edfa992bcb7bc901455fe2cff18793a7f..ce97240b3bd83549b309a9e831dda950837d1dbb 100644 (file)
@@ -114,6 +114,8 @@ class EventBaseLoopControllerT : public LoopController {
 };
 
 using EventBaseLoopController = EventBaseLoopControllerT<folly::EventBase>;
 };
 
 using EventBaseLoopController = EventBaseLoopControllerT<folly::EventBase>;
+using VirtualEventBaseLoopController =
+    EventBaseLoopControllerT<folly::VirtualEventBase>;
 }
 } // folly::fibers
 
 }
 } // folly::fibers