X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fio%2Fasync%2FEventBaseThread.h;h=a8c3d3074d6d3c4b968a43ecdcd4070fd69c337a;hb=f2925b23df8d85ebca72d62a69f1282528c086de;hp=a4ac541ab851e7d626a140c167d86af901f236ee;hpb=e5cb9b3d4ce31408239c2d316520ddcc4758a22e;p=folly.git diff --git a/folly/io/async/EventBaseThread.h b/folly/io/async/EventBaseThread.h index a4ac541a..a8c3d307 100644 --- a/folly/io/async/EventBaseThread.h +++ b/folly/io/async/EventBaseThread.h @@ -1,5 +1,5 @@ /* - * 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. @@ -16,6 +16,7 @@ #pragma once +#include #include namespace folly { @@ -27,7 +28,10 @@ class ScopedEventBaseThread; 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(); @@ -37,7 +41,7 @@ class EventBaseThread { EventBase* getEventBase() const; bool running() const; - void start(); + void start(folly::StringPiece threadName = folly::StringPiece()); void stop(); private: @@ -47,4 +51,4 @@ class EventBaseThread { EventBaseManager* ebm_; std::unique_ptr th_; }; -} +} // namespace folly