Name the Flipper scheduler/threads
Summary: Plumbs through an optional name for FollyScopedThreadScheduler. This allows the threads to be named in XCode/lldb. Differential Revision: D38582449 fbshipit-source-id: 1de50d25c0f91e7003cf81cb22faf4b10a8e23a8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e1a305a6ca
commit
b7c38556ce
@@ -17,6 +17,10 @@ namespace facebook {
|
||||
namespace flipper {
|
||||
|
||||
struct FollyScopedThreadScheduler : public Scheduler {
|
||||
FollyScopedThreadScheduler() : FollyScopedThreadScheduler("") {}
|
||||
FollyScopedThreadScheduler(folly::StringPiece name)
|
||||
: thread_(nullptr, name) {}
|
||||
|
||||
virtual void schedule(Func&& t) override {
|
||||
thread_.getEventBase()->add(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user