/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#pragma once
+#include <folly/Range.h>
#include <memory>
namespace folly {
class EventBaseThread {
public:
EventBaseThread();
- explicit EventBaseThread(bool autostart, EventBaseManager* ebm = nullptr);
+ explicit EventBaseThread(
+ bool autostart,
+ EventBaseManager* ebm = nullptr,
+ folly::StringPiece threadName = folly::StringPiece());
explicit EventBaseThread(EventBaseManager* ebm);
~EventBaseThread();
EventBase* getEventBase() const;
bool running() const;
- void start();
+ void start(folly::StringPiece threadName = folly::StringPiece());
void stop();
private:
EventBaseManager* ebm_;
std::unique_ptr<ScopedEventBaseThread> th_;
};
-}
+} // namespace folly