From 75ad72b01bff0373837bb14fb83a201dc9fc5a1a Mon Sep 17 00:00:00 2001 From: Yuri Putivsky Date: Mon, 30 Mar 2015 23:39:58 -0700 Subject: [PATCH] Get access to EventBaseManager object Summary: as title Test Plan: run unit tests Reviewed By: yfeldblum@fb.com Subscribers: ming, fugalh, folly-diffs@, jsedgwick, yfeldblum, chalfant FB internal diff: D1955074 --- folly/wangle/concurrent/IOThreadPoolExecutor.cpp | 4 ++++ folly/wangle/concurrent/IOThreadPoolExecutor.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/folly/wangle/concurrent/IOThreadPoolExecutor.cpp b/folly/wangle/concurrent/IOThreadPoolExecutor.cpp index 4ac0b79b..f8a68e25 100644 --- a/folly/wangle/concurrent/IOThreadPoolExecutor.cpp +++ b/folly/wangle/concurrent/IOThreadPoolExecutor.cpp @@ -129,6 +129,10 @@ EventBase* IOThreadPoolExecutor::getEventBase( return nullptr; } +EventBaseManager* IOThreadPoolExecutor::getEventBaseManager() { + return eventBaseManager_; +} + std::shared_ptr IOThreadPoolExecutor::makeThread() { return std::make_shared(this); diff --git a/folly/wangle/concurrent/IOThreadPoolExecutor.h b/folly/wangle/concurrent/IOThreadPoolExecutor.h index 00aaa477..b298ccae 100644 --- a/folly/wangle/concurrent/IOThreadPoolExecutor.h +++ b/folly/wangle/concurrent/IOThreadPoolExecutor.h @@ -44,6 +44,8 @@ class IOThreadPoolExecutor : public ThreadPoolExecutor, public IOExecutor { static EventBase* getEventBase(ThreadPoolExecutor::ThreadHandle*); + EventBaseManager* getEventBaseManager(); + private: struct FOLLY_ALIGN_TO_AVOID_FALSE_SHARING IOThread : public Thread { IOThread(IOThreadPoolExecutor* pool) -- 2.34.1