getVia() and waitVia()
[folly.git] / folly / io / async / EventBase.h
index 109da17cc5839c319ce3df3be1e305b1c07b6cb2..484977b13563c9298ba57cf2328cdb3a06c48c28 100644 (file)
@@ -21,6 +21,7 @@
 #include <folly/io/async/TimeoutManager.h>
 #include <folly/io/async/Request.h>
 #include <folly/Executor.h>
+#include <folly/futures/DrivableExecutor.h>
 #include <memory>
 #include <stack>
 #include <list>
@@ -95,9 +96,9 @@ class RequestEventBase : public RequestData {
  * EventBase from other threads.  When it is safe to call a method from
  * another thread it is explicitly listed in the method comments.
  */
-class EventBase :
-  private boost::noncopyable, public TimeoutManager, public Executor
-{
+class EventBase : private boost::noncopyable,
+                  public TimeoutManager,
+                  public DrivableExecutor {
  public:
   /**
    * A callback interface to use with runInLoop()
@@ -485,6 +486,11 @@ class EventBase :
     runInEventBaseThread(fn);
   }
 
+  /// Implements the DrivableExecutor interface
+  void drive() override {
+    loopOnce();
+  }
+
  private:
 
   // TimeoutManager