Skip to content

Commit

Permalink
Add a constructor for options + observer
Browse files Browse the repository at this point in the history
Summary: Currently can pass in one or the other, but not both

Reviewed By: ot

Differential Revision: D43515286

fbshipit-source-id: 9d645bd428fb9ebba011ca070543f3795decaec2
  • Loading branch information
Anton Likhtarov authored and facebook-github-bot committed Mar 24, 2023
1 parent 918bc9d commit 77e08c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions folly/io/async/EventBaseManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ class EventBaseManager {
*/
EventBaseManager() = default;

explicit EventBaseManager(folly::EventBase::Options options)
: options_(std::move(options)) {}
explicit EventBaseManager(
folly::EventBase::Options options,
std::shared_ptr<EventBaseObserver> observer = nullptr)
: options_(std::move(options)), observer_(std::move(observer)) {}

~EventBaseManager() = default;

Expand Down

0 comments on commit 77e08c2

Please sign in to comment.