namespace folly {
- /// When work is "queued", execute it immediately inline.
- /// Usually when you think you want this, you actually want a
- /// QueuedImmediateExecutor.
- class InlineExecutor : public Executor {
- public:
- void add(Func f) override {
- f();
- }
- };
+/// When work is "queued", execute it immediately inline.
+/// Usually when you think you want this, you actually want a
+/// QueuedImmediateExecutor.
+class InlineExecutor : public Executor {
+ public:
+ static InlineExecutor& instance();
-}
+ void add(Func f) override {
+ f();
+ }
+};
+
+} // namespace folly