Revert my change (which broke down the cont build)
[folly.git] / folly / futures / QueuedImmediateExecutor.h
index a82c32dbdb58b5d6c2bed19f79d2d0c57d2a5103..d1faa7e7d0051134bad6983b53a08b8eb224bcba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 
 #include <folly/Executor.h>
 
-namespace folly { namespace wangle {
+namespace folly {
 
 /**
  * Runs inline like InlineExecutor, but with a queue so that any tasks added
@@ -27,7 +27,13 @@ namespace folly { namespace wangle {
  */
 class QueuedImmediateExecutor : public Executor {
  public:
-  void add(Func) override;
+  /// There's really only one queue per thread, no matter how many
+  /// QueuedImmediateExecutor objects you may have.
+  static void addStatic(Func);
+
+  void add(Func func) override {
+    addStatic(std::move(func));
+  }
 };
 
-}} // namespace
+} // folly