Baton support for wait-options
[folly.git] / folly / Executor.h
index d4a190a6c1934f245abde5ff517f997fb6330399..a2ac0d6358089e7f4330f626180f125ebdb78c49 100644 (file)
@@ -28,7 +28,8 @@ using Func = Function<void()>;
 /// threadsafe.
 class Executor {
  public:
-  virtual ~Executor() = default;
+  // Workaround for a linkage problem with explicitly defaulted dtor t22914621
+  virtual ~Executor() {}
 
   /// Enqueue a function to executed by this executor. This and all
   /// variants must be threadsafe.
@@ -58,6 +59,10 @@ class Executor {
       return executor_ != nullptr;
     }
 
+    Executor* get() const {
+      return executor_.get();
+    }
+
    private:
     friend class Executor;
     explicit KeepAlive(folly::Executor* executor) : executor_(executor) {}