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:
Marcelo Lopez Ruiz
2022-08-10 21:21:39 -07:00
committed by Facebook GitHub Bot
parent e1a305a6ca
commit b7c38556ce
2 changed files with 8 additions and 2 deletions

View File

@@ -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);
}