Commit dca6f3ea authored by James Sedgwick's avatar James Sedgwick Committed by Facebook Github Bot

move futures/DrivableExecutor to executors/DrivableExecutor

Summary: as title

Reviewed By: yfeldblum

Differential Revision: D6062437

fbshipit-source-id: 4f99e779e280fdb0b1f035013caff18764e86ab5
parent 86617507
...@@ -88,6 +88,7 @@ nobase_follyinclude_HEADERS = \ ...@@ -88,6 +88,7 @@ nobase_follyinclude_HEADERS = \
executors/BlockingQueue.h \ executors/BlockingQueue.h \
executors/CPUThreadPoolExecutor.h \ executors/CPUThreadPoolExecutor.h \
executors/Codel.h \ executors/Codel.h \
executors/DrivableExecutor.h \
executors/FiberIOExecutor.h \ executors/FiberIOExecutor.h \
executors/FutureExecutor.h \ executors/FutureExecutor.h \
executors/GlobalExecutor.h \ executors/GlobalExecutor.h \
...@@ -205,7 +206,6 @@ nobase_follyinclude_HEADERS = \ ...@@ -205,7 +206,6 @@ nobase_follyinclude_HEADERS = \
Format-inl.h \ Format-inl.h \
functional/Invoke.h \ functional/Invoke.h \
futures/Barrier.h \ futures/Barrier.h \
futures/DrivableExecutor.h \
futures/Future-pre.h \ futures/Future-pre.h \
futures/helpers.h \ futures/helpers.h \
futures/Future.h \ futures/Future.h \
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <folly/ExceptionString.h> #include <folly/ExceptionString.h>
#include <folly/Function.h> #include <folly/Function.h>
#include <folly/futures/DrivableExecutor.h> #include <folly/executors/DrivableExecutor.h>
#include <folly/io/async/NotificationQueue.h> #include <folly/io/async/NotificationQueue.h>
namespace folly { namespace folly {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/Try.h> #include <folly/Try.h>
#include <folly/Utility.h> #include <folly/Utility.h>
#include <folly/futures/DrivableExecutor.h> #include <folly/executors/DrivableExecutor.h>
#include <folly/futures/FutureException.h> #include <folly/futures/FutureException.h>
#include <folly/futures/Promise.h> #include <folly/futures/Promise.h>
#include <folly/futures/detail/Types.h> #include <folly/futures/detail/Types.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <queue> #include <queue>
#include <folly/LifoSem.h> #include <folly/LifoSem.h>
#include <folly/futures/DrivableExecutor.h> #include <folly/executors/DrivableExecutor.h>
#include <folly/futures/ScheduledExecutor.h> #include <folly/futures/ScheduledExecutor.h>
namespace folly { namespace folly {
......
...@@ -902,7 +902,7 @@ Although inspired by the C++11 std::future interface, it is not a drop-in replac ...@@ -902,7 +902,7 @@ Although inspired by the C++11 std::future interface, it is not a drop-in replac
<h3 id="getvia-and-waitvia">getVia() and waitVia() <a href="#getvia-and-waitvia" class="headerLink">#</a></h3> <h3 id="getvia-and-waitvia">getVia() and waitVia() <a href="#getvia-and-waitvia" class="headerLink">#</a></h3>
<p><tt>T Future&lt;T&gt;::getVia(DrivableExecutor*)</tt> and <tt>Future&lt;T&gt; Future&lt;T&gt;::waitVia(DrivableExecutor*)</tt> have the same semantics as <tt>get()</tt> and <tt>wait()</tt> except that they drive some Executor until the Future is complete. <a href="https://github.com/facebook/folly/blob/master/folly/futures/DrivableExecutor.h" target="_blank"><tt>DrivableExecutor</tt></a> is a simple subinterface of <tt>Executor</tt> that requires the presence of a method <tt>drive()</tt> which can somehow make progress on the Executor&#039;s work. Two commonly helpful implementations are <a href="https://github.com/facebook/folly/blob/master/folly/io/async/EventBase.h" target="_blank"><tt>EventBase</tt></a> (where <tt>drive()</tt> loops on the EventBase) and <a href="https://github.com/facebook/folly/blob/master/folly/futures/ManualExecutor.h" target="_blank"><tt>ManualExecutor</tt></a>. These are simple but useful sugar for the following common pattern:</p> <p><tt>T Future&lt;T&gt;::getVia(DrivableExecutor*)</tt> and <tt>Future&lt;T&gt; Future&lt;T&gt;::waitVia(DrivableExecutor*)</tt> have the same semantics as <tt>get()</tt> and <tt>wait()</tt> except that they drive some Executor until the Future is complete. <a href="https://github.com/facebook/folly/blob/master/folly/executors/DrivableExecutor.h" target="_blank"><tt>DrivableExecutor</tt></a> is a simple subinterface of <tt>Executor</tt> that requires the presence of a method <tt>drive()</tt> which can somehow make progress on the Executor&#039;s work. Two commonly helpful implementations are <a href="https://github.com/facebook/folly/blob/master/folly/io/async/EventBase.h" target="_blank"><tt>EventBase</tt></a> (where <tt>drive()</tt> loops on the EventBase) and <a href="https://github.com/facebook/folly/blob/master/folly/futures/ManualExecutor.h" target="_blank"><tt>ManualExecutor</tt></a>. These are simple but useful sugar for the following common pattern:</p>
<p>Given this:</p> <p>Given this:</p>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <folly/Baton.h> #include <folly/Baton.h>
#include <folly/MPMCQueue.h> #include <folly/MPMCQueue.h>
#include <folly/futures/DrivableExecutor.h> #include <folly/executors/DrivableExecutor.h>
#include <folly/futures/Future.h> #include <folly/futures/Future.h>
#include <folly/futures/InlineExecutor.h> #include <folly/futures/InlineExecutor.h>
#include <folly/futures/ManualExecutor.h> #include <folly/futures/ManualExecutor.h>
......
...@@ -40,15 +40,14 @@ ...@@ -40,15 +40,14 @@
#include <folly/Function.h> #include <folly/Function.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/ScopeGuard.h> #include <folly/ScopeGuard.h>
#include <folly/executors/DrivableExecutor.h>
#include <folly/experimental/ExecutionObserver.h> #include <folly/experimental/ExecutionObserver.h>
#include <folly/futures/DrivableExecutor.h>
#include <folly/io/async/AsyncTimeout.h> #include <folly/io/async/AsyncTimeout.h>
#include <folly/io/async/HHWheelTimer.h> #include <folly/io/async/HHWheelTimer.h>
#include <folly/io/async/Request.h> #include <folly/io/async/Request.h>
#include <folly/io/async/TimeoutManager.h> #include <folly/io/async/TimeoutManager.h>
#include <folly/portability/Event.h> #include <folly/portability/Event.h>
namespace folly { namespace folly {
using Cob = Func; // defined in folly/Executor.h using Cob = Func; // defined in folly/Executor.h
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment