Commit 2622d2f3 authored by Andrii Grynenko's avatar Andrii Grynenko Committed by Facebook Github Bot 5

Move fibers out of experimental

Summary: folly::fibers have been used by mcrouter for more than 2 years, so not really experimental.

Reviewed By: pavlo-fb

Differential Revision: D3320595

fbshipit-source-id: 68188f92b71a4206d57222993848521ca5437ef5
parent 6698301a
...@@ -96,32 +96,32 @@ nobase_follyinclude_HEADERS = \ ...@@ -96,32 +96,32 @@ nobase_follyinclude_HEADERS = \
experimental/EventCount.h \ experimental/EventCount.h \
experimental/Instructions.h \ experimental/Instructions.h \
experimental/bser/Bser.h \ experimental/bser/Bser.h \
experimental/fibers/AddTasks.h \ fibers/AddTasks.h \
experimental/fibers/AddTasks-inl.h \ fibers/AddTasks-inl.h \
experimental/fibers/Baton.h \ fibers/Baton.h \
experimental/fibers/Baton-inl.h \ fibers/Baton-inl.h \
experimental/fibers/BoostContextCompatibility.h \ fibers/BoostContextCompatibility.h \
experimental/fibers/EventBaseLoopController.h \ fibers/EventBaseLoopController.h \
experimental/fibers/EventBaseLoopController-inl.h \ fibers/EventBaseLoopController-inl.h \
experimental/fibers/Fiber.h \ fibers/Fiber.h \
experimental/fibers/Fiber-inl.h \ fibers/Fiber-inl.h \
experimental/fibers/FiberManager.h \ fibers/FiberManager.h \
experimental/fibers/FiberManager-inl.h \ fibers/FiberManager-inl.h \
experimental/fibers/FiberManagerMap.h \ fibers/FiberManagerMap.h \
experimental/fibers/ForEach.h \ fibers/ForEach.h \
experimental/fibers/ForEach-inl.h \ fibers/ForEach-inl.h \
experimental/fibers/GenericBaton.h \ fibers/GenericBaton.h \
experimental/fibers/GuardPageAllocator.h \ fibers/GuardPageAllocator.h \
experimental/fibers/LoopController.h \ fibers/LoopController.h \
experimental/fibers/Promise.h \ fibers/Promise.h \
experimental/fibers/Promise-inl.h \ fibers/Promise-inl.h \
experimental/fibers/SimpleLoopController.h \ fibers/SimpleLoopController.h \
experimental/fibers/TimedMutex.h \ fibers/TimedMutex.h \
experimental/fibers/TimedMutex-inl.h \ fibers/TimedMutex-inl.h \
experimental/fibers/TimeoutController.h \ fibers/TimeoutController.h \
experimental/fibers/traits.h \ fibers/traits.h \
experimental/fibers/WhenN.h \ fibers/WhenN.h \
experimental/fibers/WhenN-inl.h \ fibers/WhenN-inl.h \
experimental/FunctionScheduler.h \ experimental/FunctionScheduler.h \
experimental/FutureDAG.h \ experimental/FutureDAG.h \
experimental/io/FsUtil.h \ experimental/io/FsUtil.h \
...@@ -464,12 +464,12 @@ libfolly_la_SOURCES = \ ...@@ -464,12 +464,12 @@ libfolly_la_SOURCES = \
experimental/bser/Dump.cpp \ experimental/bser/Dump.cpp \
experimental/bser/Load.cpp \ experimental/bser/Load.cpp \
experimental/DynamicParser.cpp \ experimental/DynamicParser.cpp \
experimental/fibers/Baton.cpp \ fibers/Baton.cpp \
experimental/fibers/Fiber.cpp \ fibers/Fiber.cpp \
experimental/fibers/FiberManager.cpp \ fibers/FiberManager.cpp \
experimental/fibers/FiberManagerMap.cpp \ fibers/FiberManagerMap.cpp \
experimental/fibers/GuardPageAllocator.cpp \ fibers/GuardPageAllocator.cpp \
experimental/fibers/TimeoutController.cpp \ fibers/TimeoutController.cpp \
experimental/FunctionScheduler.cpp \ experimental/FunctionScheduler.cpp \
experimental/io/FsUtil.cpp \ experimental/io/FsUtil.cpp \
experimental/JSONSchema.cpp \ experimental/JSONSchema.cpp \
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#include <vector> #include <vector>
#include <folly/Optional.h> #include <folly/Optional.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
#include <folly/experimental/fibers/Promise.h> #include <folly/fibers/Promise.h>
#include <folly/futures/Try.h> #include <folly/futures/Try.h>
namespace folly { namespace folly {
...@@ -131,4 +131,4 @@ class TaskIterator { ...@@ -131,4 +131,4 @@ class TaskIterator {
} }
} }
#include <folly/experimental/fibers/AddTasks-inl.h> #include <folly/fibers/AddTasks-inl.h>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/experimental/fibers/Fiber.h> #include <folly/fibers/Fiber.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <chrono> #include <chrono>
#include <folly/detail/MemoryIdler.h> #include <folly/detail/MemoryIdler.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
#include <folly/portability/Asm.h> #include <folly/portability/Asm.h>
namespace folly { namespace folly {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <atomic> #include <atomic>
#include <folly/detail/Futex.h> #include <folly/detail/Futex.h>
#include <folly/experimental/fibers/TimeoutController.h> #include <folly/fibers/TimeoutController.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
...@@ -188,4 +188,4 @@ class Baton { ...@@ -188,4 +188,4 @@ class Baton {
} }
} }
#include <folly/experimental/fibers/Baton-inl.h> #include <folly/fibers/Baton-inl.h>
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/experimental/fibers/EventBaseLoopController.h> #include <folly/fibers/EventBaseLoopController.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include <folly/experimental/fibers/LoopController.h> #include <folly/fibers/LoopController.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <atomic> #include <atomic>
#include <memory> #include <memory>
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <folly/Likely.h> #include <folly/Likely.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/experimental/fibers/BoostContextCompatibility.h> #include <folly/fibers/BoostContextCompatibility.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
#include <folly/portability/SysSyscall.h> #include <folly/portability/SysSyscall.h>
namespace folly { namespace folly {
......
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
#include <functional> #include <functional>
#include <typeinfo> #include <typeinfo>
#include <boost/context/all.hpp>
#include <boost/version.hpp>
#include <folly/AtomicIntrusiveLinkedList.h> #include <folly/AtomicIntrusiveLinkedList.h>
#include <folly/CPortability.h> #include <folly/CPortability.h>
#include <folly/Function.h> #include <folly/Function.h>
#include <folly/IntrusiveList.h> #include <folly/IntrusiveList.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/experimental/fibers/BoostContextCompatibility.h> #include <folly/fibers/BoostContextCompatibility.h>
#include <folly/io/async/Request.h> #include <folly/io/async/Request.h>
#include <boost/context/all.hpp>
#include <boost/version.hpp>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
...@@ -189,4 +189,4 @@ class Fiber { ...@@ -189,4 +189,4 @@ class Fiber {
} }
} }
#include <folly/experimental/fibers/Fiber-inl.h> #include <folly/fibers/Fiber-inl.h>
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
#ifdef __APPLE__ #ifdef __APPLE__
#include <folly/ThreadLocal.h> #include <folly/ThreadLocal.h>
#endif #endif
#include <folly/experimental/fibers/Baton.h> #include <folly/fibers/Baton.h>
#include <folly/experimental/fibers/Fiber.h> #include <folly/fibers/Fiber.h>
#include <folly/experimental/fibers/LoopController.h> #include <folly/fibers/LoopController.h>
#include <folly/experimental/fibers/Promise.h> #include <folly/fibers/Promise.h>
#include <folly/futures/Promise.h> #include <folly/futures/Promise.h>
#include <folly/futures/Try.h> #include <folly/futures/Try.h>
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include <glog/logging.h> #include <glog/logging.h>
#include <folly/experimental/fibers/Fiber.h> #include <folly/fibers/Fiber.h>
#include <folly/experimental/fibers/LoopController.h> #include <folly/fibers/LoopController.h>
#include <folly/SingletonThreadLocal.h> #include <folly/SingletonThreadLocal.h>
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
#include <folly/io/async/Request.h> #include <folly/io/async/Request.h>
#include <folly/experimental/ExecutionObserver.h> #include <folly/experimental/ExecutionObserver.h>
#include <folly/experimental/fibers/BoostContextCompatibility.h> #include <folly/fibers/BoostContextCompatibility.h>
#include <folly/experimental/fibers/Fiber.h> #include <folly/fibers/Fiber.h>
#include <folly/experimental/fibers/GuardPageAllocator.h> #include <folly/fibers/GuardPageAllocator.h>
#include <folly/experimental/fibers/TimeoutController.h> #include <folly/fibers/TimeoutController.h>
#include <folly/experimental/fibers/traits.h> #include <folly/fibers/traits.h>
namespace folly { namespace folly {
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
*/ */
#pragma once #pragma once
#include <folly/experimental/fibers/EventBaseLoopController.h> #include <folly/fibers/EventBaseLoopController.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -41,4 +41,4 @@ inline void forEach(InputIterator first, InputIterator last, F&& f); ...@@ -41,4 +41,4 @@ inline void forEach(InputIterator first, InputIterator last, F&& f);
} }
} // folly::fibers } // folly::fibers
#include <folly/experimental/fibers/ForEach-inl.h> #include <folly/fibers/ForEach-inl.h>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <folly/Baton.h> #include <folly/Baton.h>
#include <folly/experimental/fibers/Baton.h> #include <folly/fibers/Baton.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/experimental/fibers/Baton.h> #include <folly/fibers/Baton.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include <folly/experimental/fibers/traits.h> #include <folly/fibers/traits.h>
#include <folly/futures/Try.h> #include <folly/futures/Try.h>
namespace folly { namespace folly {
...@@ -101,4 +101,4 @@ class Promise { ...@@ -101,4 +101,4 @@ class Promise {
} }
} }
#include <folly/experimental/fibers/Promise-inl.h> #include <folly/fibers/Promise-inl.h>
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
<span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([&amp;]()</span> <span class="o">&#123;</span> <span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([&amp;]()</span> <span class="o">&#123;</span>
<span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 1: start&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 1: start&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span>
<span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="wait">wait</span><span class="o">();</span> <span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="wait">wait</span><span class="o">();</span>
<span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 1: after baton.wait()&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 1: after baton.wait()&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span>
<span class="o">&#125;);</span> <span class="o">&#125;);</span>
<span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([&amp;]()</span> <span class="o">&#123;</span> <span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([&amp;]()</span> <span class="o">&#123;</span>
<span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 2: start&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 2: start&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span>
<span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="post">post</span><span class="o">();</span> <span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="post">post</span><span class="o">();</span>
<span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 2: after baton.post()&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task 2: after baton.post()&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span>
<span class="o">&#125;);</span> <span class="o">&#125;);</span>
<span class="no">evb</span><span class="o">.</span><span class="nf" data-symbol-name="loop">loop</span><span class="o">();</span> <span class="no">evb</span><span class="o">.</span><span class="nf" data-symbol-name="loop">loop</span><span class="o">();</span>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([&amp;]()</span> <span class="o">&#123;</span> <span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([&amp;]()</span> <span class="o">&#123;</span>
<span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task: start&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task: start&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span>
<span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="wait">wait</span><span class="o">();</span> <span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="wait">wait</span><span class="o">();</span>
<span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task: after baton.wait()&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="cout">cout</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Task: after baton.wait()&quot;</span> <span class="o">&lt;&lt;</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="na" data-symbol-context="std" data-symbol-name="endl">endl</span><span class="o">;</span>
<span class="o">&#125;);</span> <span class="o">&#125;);</span>
<span class="no">evb</span><span class="o">.</span><span class="nf" data-symbol-name="loop">loop</span><span class="o">();</span> <span class="no">evb</span><span class="o">.</span><span class="nf" data-symbol-name="loop">loop</span><span class="o">();</span>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<p><tt>fibers::Baton</tt> is the core synchronization primitive which is used to suspend a fiber-task and notify when the task may be resumed. <tt>fibers::Baton</tt> supports two basic operations: <tt>wait()</tt> and <tt>post()</tt>. Calling <tt>wait()</tt> on a Baton will suspend current fiber-task until <tt>post()</tt> is called on the same Baton.</p> <p><tt>fibers::Baton</tt> is the core synchronization primitive which is used to suspend a fiber-task and notify when the task may be resumed. <tt>fibers::Baton</tt> supports two basic operations: <tt>wait()</tt> and <tt>post()</tt>. Calling <tt>wait()</tt> on a Baton will suspend current fiber-task until <tt>post()</tt> is called on the same Baton.</p>
<p>Please refer to <a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/Baton.h" target="_blank">Baton</a> for more detailed documentation.</p> <p>Please refer to <a href="https://github.com/facebook/folly/blob/master/folly/fibers/Baton.h" target="_blank">Baton</a> for more detailed documentation.</p>
<div class="remarkup-note"><span class="remarkup-note-word">NOTE:</span> <tt>fibers::Baton</tt> is the only native synchronization primitive of folly::fibers library. All other synchronization primitives provided by folly::fibers are built on top of <tt>fibers::Baton</tt>.</div> <div class="remarkup-note"><span class="remarkup-note-word">NOTE:</span> <tt>fibers::Baton</tt> is the only native synchronization primitive of folly::fibers library. All other synchronization primitives provided by folly::fibers are built on top of <tt>fibers::Baton</tt>.</div>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<span class="o">...</span> <span class="o">...</span>
<span class="no">Response</span> <span class="no">response</span><span class="o">;</span> <span class="no">Response</span> <span class="no">response</span><span class="o">;</span>
<span class="nc" data-symbol-name="fibers">fibers</span><span class="o">::</span><span class="na" data-symbol-context="fibers" data-symbol-name="Baton">Baton</span> <span class="no">baton</span><span class="o">;</span> <span class="nc" data-symbol-name="fibers">fibers</span><span class="o">::</span><span class="na" data-symbol-context="fibers" data-symbol-name="Baton">Baton</span> <span class="no">baton</span><span class="o">;</span>
<span class="nf" data-symbol-name="asyncCall">asyncCall</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="o">[&amp;](</span><span class="no">Response</span> <span class="no">r</span><span class="o">)</span> <span class="no">mutable</span> <span class="o">&#123;</span> <span class="nf" data-symbol-name="asyncCall">asyncCall</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="o">[&amp;](</span><span class="no">Response</span> <span class="no">r</span><span class="o">)</span> <span class="no">mutable</span> <span class="o">&#123;</span>
<span class="no">response</span> <span class="o">=</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="nf" data-symbol-context="std" data-symbol-name="move">move</span><span class="o">(</span><span class="no">r</span><span class="o">);</span> <span class="no">response</span> <span class="o">=</span> <span class="nc" data-symbol-name="std">std</span><span class="o">::</span><span class="nf" data-symbol-context="std" data-symbol-name="move">move</span><span class="o">(</span><span class="no">r</span><span class="o">);</span>
<span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="post">post</span><span class="o">();</span> <span class="no">baton</span><span class="o">.</span><span class="nf" data-symbol-name="post">post</span><span class="o">();</span>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<span class="o">...</span> <span class="o">...</span>
<span class="o">&#125;</span></pre></div> <span class="o">&#125;</span></pre></div>
<p>Please refer to <a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/Promise.h" target="_blank">await</a> for more detailed documentation.</p> <p>Please refer to <a href="https://github.com/facebook/folly/blob/master/folly/fibers/Promise.h" target="_blank">await</a> for more detailed documentation.</p>
<div class="remarkup-note"><span class="remarkup-note-word">NOTE:</span> most of your code written with folly::fibers, won&#039;t be using <tt>fibers::Baton</tt> or <tt>fibers::await</tt>. These primitives should only be used to integrate with other asynchronous API which are not fibers-compatible.</div> <div class="remarkup-note"><span class="remarkup-note-word">NOTE:</span> most of your code written with folly::fibers, won&#039;t be using <tt>fibers::Baton</tt> or <tt>fibers::await</tt>. These primitives should only be used to integrate with other asynchronous API which are not fibers-compatible.</div>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<div class="remarkup-code-block" data-code-lang="php"><pre class="remarkup-code"><span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([]()</span> <span class="o">&#123;</span> <div class="remarkup-code-block" data-code-lang="php"><pre class="remarkup-code"><span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTask">addTask</span><span class="o">([]()</span> <span class="o">&#123;</span>
<span class="o">...</span> <span class="o">...</span>
<span class="no">auto</span> <span class="no">response</span> <span class="o">=</span> <span class="nf" data-symbol-name="asyncCallFuture">asyncCallFuture</span><span class="o">(</span><span class="no">request</span><span class="o">).</span><span class="nf" data-symbol-name="get">get</span><span class="o">();</span> <span class="no">auto</span> <span class="no">response</span> <span class="o">=</span> <span class="nf" data-symbol-name="asyncCallFuture">asyncCallFuture</span><span class="o">(</span><span class="no">request</span><span class="o">).</span><span class="nf" data-symbol-name="get">get</span><span class="o">();</span>
<span class="c">// Now response holds response returned by the async call</span> <span class="c">// Now response holds response returned by the async call</span>
<span class="o">...</span> <span class="o">...</span>
<span class="o">&#125;</span></pre></div> <span class="o">&#125;</span></pre></div>
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
<div class="remarkup-code-block" data-code-lang="php"><pre class="remarkup-code"><span class="o">...</span> <div class="remarkup-code-block" data-code-lang="php"><pre class="remarkup-code"><span class="o">...</span>
<span class="no">Context</span> <span class="no">context</span><span class="o">;</span> <span class="no">Context</span> <span class="no">context</span><span class="o">;</span>
<span class="nf" data-symbol-name="asyncCall">asyncCall</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="o">[</span><span class="no">request</span><span class="o">,</span> <span class="no">context</span><span class="o">](</span><span class="no">Response</span> <span class="no">response</span><span class="o">)</span> <span class="no">mutable</span> <span class="o">&#123;</span> <span class="nf" data-symbol-name="asyncCall">asyncCall</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="o">[</span><span class="no">request</span><span class="o">,</span> <span class="no">context</span><span class="o">](</span><span class="no">Response</span> <span class="no">response</span><span class="o">)</span> <span class="no">mutable</span> <span class="o">&#123;</span>
<span class="nf" data-symbol-name="doSomething">doSomething</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="no">response</span><span class="o">,</span> <span class="no">context</span><span class="o">);</span> <span class="nf" data-symbol-name="doSomething">doSomething</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="no">response</span><span class="o">,</span> <span class="no">context</span><span class="o">);</span>
<span class="o">&#125;);</span> <span class="o">&#125;);</span>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<span class="no">Context</span> <span class="no">context</span><span class="o">;</span> <span class="no">Context</span> <span class="no">context</span><span class="o">;</span>
<span class="no">auto</span> <span class="no">response</span> <span class="o">=</span> <span class="nf" data-symbol-name="fiberCall">fiberCall</span><span class="o">(</span><span class="no">request</span><span class="o">);</span> <span class="no">auto</span> <span class="no">response</span> <span class="o">=</span> <span class="nf" data-symbol-name="fiberCall">fiberCall</span><span class="o">(</span><span class="no">request</span><span class="o">);</span>
<span class="nf" data-symbol-name="doSomething">doSomething</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="no">response</span><span class="o">,</span> <span class="no">context</span><span class="o">);</span> <span class="nf" data-symbol-name="doSomething">doSomething</span><span class="o">(</span><span class="no">request</span><span class="o">,</span> <span class="no">response</span><span class="o">,</span> <span class="no">context</span><span class="o">);</span>
<span class="o">...</span> <span class="o">...</span>
<span class="o">&#125;);</span></pre></div> <span class="o">&#125;);</span></pre></div>
...@@ -308,10 +308,10 @@ ...@@ -308,10 +308,10 @@
<p>First fiber-task will grab a lock and then suspend waiting on a <tt>fibers::Baton</tt>. Then second fiber-task will be run and it will try to grab a lock. Unlike system threads, fiber-task can be only suspended explicitly, so the whole system thread will be blocked waiting on the lock, and we end up with a dead-lock.</p> <p>First fiber-task will grab a lock and then suspend waiting on a <tt>fibers::Baton</tt>. Then second fiber-task will be run and it will try to grab a lock. Unlike system threads, fiber-task can be only suspended explicitly, so the whole system thread will be blocked waiting on the lock, and we end up with a dead-lock.</p>
<p>There&#039;re generally two ways we can solve this problem. Ideally we would re-design the program to never not hold any locks when fiber-task is suspended. However if we are absolutely sure we need that lock - folly::fibers library provides some fiber-task-aware lock implementations (e.g. <p>There&#039;re generally two ways we can solve this problem. Ideally we would re-design the program to never not hold any locks when fiber-task is suspended. However if we are absolutely sure we need that lock - folly::fibers library provides some fiber-task-aware lock implementations (e.g.
<a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/TimedMutex.h" target="_blank">TimedMutex</a>).</p></section><section class="dex_document"><h1>APIs</h1><p class="dex_introduction"></p><h2 id="fibers-baton">fibers::Baton <a href="#fibers-baton" class="headerLink">#</a></h2> <a href="https://github.com/facebook/folly/blob/master/folly/fibers/TimedMutex.h" target="_blank">TimedMutex</a>).</p></section><section class="dex_document"><h1>APIs</h1><p class="dex_introduction"></p><h2 id="fibers-baton">fibers::Baton <a href="#fibers-baton" class="headerLink">#</a></h2>
<p>All of the features of folly::fibers library are actually built on top a single synchronization primitive called Baton. <tt>fibers::Baton</tt> is a fiber-specific version of <tt>folly::Baton</tt>. It only supports two basic operations: <tt>wait()</tt> and <tt>post()</tt>. Whenever <tt>wait()</tt> is called on the Baton, the current thread or fiber-task is suspended, until <tt>post()</tt> is called on the same Baton. <tt>wait()</tt> does not suspend the thread or fiber-task if <tt>post()</tt> was already called on the Baton. Please refer to <a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/Baton.h" target="_blank">Baton</a> for more detailed documentation.</p> <p>All of the features of folly::fibers library are actually built on top a single synchronization primitive called Baton. <tt>fibers::Baton</tt> is a fiber-specific version of <tt>folly::Baton</tt>. It only supports two basic operations: <tt>wait()</tt> and <tt>post()</tt>. Whenever <tt>wait()</tt> is called on the Baton, the current thread or fiber-task is suspended, until <tt>post()</tt> is called on the same Baton. <tt>wait()</tt> does not suspend the thread or fiber-task if <tt>post()</tt> was already called on the Baton. Please refer to <a href="https://github.com/facebook/folly/blob/master/folly/fibers/Baton.h" target="_blank">Baton</a> for more detailed documentation.</p>
<p>Baton is thread-safe, so <tt>wait()</tt> and <tt>post()</tt> can be (and should be :) ) called from different threads or fiber-tasks.</p> <p>Baton is thread-safe, so <tt>wait()</tt> and <tt>post()</tt> can be (and should be :) ) called from different threads or fiber-tasks.</p>
...@@ -410,7 +410,7 @@ ...@@ -410,7 +410,7 @@
<span class="o">&#125;);</span> <span class="o">&#125;);</span>
<span class="no">auto</span> <span class="no">future2</span> <span class="o">=</span> <span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTaskRemoteFuture">addTaskRemoteFuture</span><span class="o">([]()</span> <span class="o">&#123;</span> <span class="no">auto</span> <span class="no">future2</span> <span class="o">=</span> <span class="no">fiberManager</span><span class="o">.</span><span class="nf" data-symbol-name="addTaskRemoteFuture">addTaskRemoteFuture</span><span class="o">([]()</span> <span class="o">&#123;</span>
<span class="o">...</span> <span class="o">...</span>
<span class="o">&#125;);</span> <span class="o">&#125;);</span>
<span class="no">auto</span> <span class="no">result1</span> <span class="o">=</span> <span class="no">future1</span><span class="o">.</span><span class="nf" data-symbol-name="get">get</span><span class="o">();</span> <span class="no">auto</span> <span class="no">result1</span> <span class="o">=</span> <span class="no">future1</span><span class="o">.</span><span class="nf" data-symbol-name="get">get</span><span class="o">();</span>
<span class="no">auto</span> <span class="no">result2</span> <span class="o">=</span> <span class="no">future2</span><span class="o">.</span><span class="nf" data-symbol-name="get">get</span><span class="o">();</span> <span class="no">auto</span> <span class="no">result2</span> <span class="o">=</span> <span class="no">future2</span><span class="o">.</span><span class="nf" data-symbol-name="get">get</span><span class="o">();</span>
...@@ -423,21 +423,21 @@ ...@@ -423,21 +423,21 @@
<p>All the listed synchronization primitives are built using <tt>fiber::Baton</tt>. Please check their source code for detailed documentation.</p> <p>All the listed synchronization primitives are built using <tt>fiber::Baton</tt>. Please check their source code for detailed documentation.</p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/Promise.h" target="_blank">await</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/Promise.h" target="_blank">await</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/WhenN.h" target="_blank">collectN</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/WhenN.h" target="_blank">collectN</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/WhenN.h" target="_blank">collectAny</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/WhenN.h" target="_blank">collectAny</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/WhenN.h" target="_blank">collectN</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/WhenN.h" target="_blank">collectN</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/ForEach.h" target="_blank">forEach</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/ForEach.h" target="_blank">forEach</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/AddTasks.h" target="_blank">addTasks</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/AddTasks.h" target="_blank">addTasks</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/TimedMutex.h" target="_blank">TimedMutex</a></p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/TimedMutex.h" target="_blank">TimedMutex</a></p>
<p><a href="https://github.com/facebook/folly/blob/master/folly/experimental/fibers/TimedMutex.h" target="_blank">TimedRWMutex</a></p></section><section class="dex_document"><h1>Fiber stacks</h1><p class="dex_introduction"></p><p>Similarly to system threads, every fiber-task has some stack space assigned to it. Stack usage goes up with the number of nested function calls and objects allocated on the stack. folly::fibers implementation only supports fiber-tasks with fixed stack size. If you want to have many fiber-tasks running concurrently - you need to reduce the amount of stack assigned to each fiber-task, otherwise you may run out of memory.</p> <p><a href="https://github.com/facebook/folly/blob/master/folly/fibers/TimedMutex.h" target="_blank">TimedRWMutex</a></p></section><section class="dex_document"><h1>Fiber stacks</h1><p class="dex_introduction"></p><p>Similarly to system threads, every fiber-task has some stack space assigned to it. Stack usage goes up with the number of nested function calls and objects allocated on the stack. folly::fibers implementation only supports fiber-tasks with fixed stack size. If you want to have many fiber-tasks running concurrently - you need to reduce the amount of stack assigned to each fiber-task, otherwise you may run out of memory.</p>
<h3 id="selecting-stack-size">Selecting stack size <a href="#selecting-stack-size" class="headerLink">#</a></h3> <h3 id="selecting-stack-size">Selecting stack size <a href="#selecting-stack-size" class="headerLink">#</a></h3>
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
<div class="remarkup-note"><span class="remarkup-note-word">NOTE:</span> folly::fibers doesn&#039;t support killing fiber-tasks in-flight (for similar reasons you can&#039;t kill a thread). If <tt>fibers::FiberManager</tt> has any outstanding fiber-tasks, when <tt>folly::EventBase</tt> is being destroyed, it will keep running the event loop until all those tasks are finished.</div></section><section class="dex_document"><h1>GDB integration</h1><p class="dex_introduction"></p><p>folly::fibers provide some GDB extensions which can be very useful for debugging. To load them simply the following in dbg console:</p> <div class="remarkup-note"><span class="remarkup-note-word">NOTE:</span> folly::fibers doesn&#039;t support killing fiber-tasks in-flight (for similar reasons you can&#039;t kill a thread). If <tt>fibers::FiberManager</tt> has any outstanding fiber-tasks, when <tt>folly::EventBase</tt> is being destroyed, it will keep running the event loop until all those tasks are finished.</div></section><section class="dex_document"><h1>GDB integration</h1><p class="dex_introduction"></p><p>folly::fibers provide some GDB extensions which can be very useful for debugging. To load them simply the following in dbg console:</p>
<div class="remarkup-code-block" data-code-lang="php"><pre class="remarkup-code"><span class="no">source</span> <span class="s1">&#039;folly/experimental/fibers/scripts/utils.gdb&#039;</span></pre></div> <div class="remarkup-code-block" data-code-lang="php"><pre class="remarkup-code"><span class="no">source</span> <span class="s1">&#039;folly/fibers/scripts/utils.gdb&#039;</span></pre></div>
<h3 id="show-all-fibermanagers">Show all FiberManagers <a href="#show-all-fibermanagers" class="headerLink">#</a></h3> <h3 id="show-all-fibermanagers">Show all FiberManagers <a href="#show-all-fibermanagers" class="headerLink">#</a></h3>
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
<span class="c">#6 at 0x415e9a in FiberManager_collectAll_Test::TestBody()::&#123;lambda()#1&#125;::operator()() const::&#123;lambda()#1&#125;::operator()() const::&#123;lambda()#1&#125;::operator()(</span> <span class="c">#6 at 0x415e9a in FiberManager_collectAll_Test::TestBody()::&#123;lambda()#1&#125;::operator()() const::&#123;lambda()#1&#125;::operator()() const::&#123;lambda()#1&#125;::operator()(</span>
<span class="o">)</span> <span class="k">const</span> <span class="o">+</span> <span class="mi">36</span> <span class="no">in</span> <span class="no">section</span> <span class="o">.</span><span class="no">text</span> <span class="no">of</span> <span class="o">/</span><span class="no">mnt</span><span class="o">/</span><span class="no">fio0</span><span class="o">/</span><span class="no">andrii</span><span class="o">/</span><span class="no">fbsource</span><span class="o">/</span><span class="no">fbcode</span><span class="o">/</span><span class="no">buck</span><span class="o">-</span><span class="no">out</span><span class="o">/</span><span class="no">gen</span><span class="o">/</span><span class="no">folly</span><span class="o">/</span><span class="no">experimental</span><span class="o">/</span><span class="no">fibers</span><span class="o">/</span><span class="no">fibers</span><span class="o">-</span><span class="no">test</span> <span class="o">)</span> <span class="k">const</span> <span class="o">+</span> <span class="mi">36</span> <span class="no">in</span> <span class="no">section</span> <span class="o">.</span><span class="no">text</span> <span class="no">of</span> <span class="o">/</span><span class="no">mnt</span><span class="o">/</span><span class="no">fio0</span><span class="o">/</span><span class="no">andrii</span><span class="o">/</span><span class="no">fbsource</span><span class="o">/</span><span class="no">fbcode</span><span class="o">/</span><span class="no">buck</span><span class="o">-</span><span class="no">out</span><span class="o">/</span><span class="no">gen</span><span class="o">/</span><span class="no">folly</span><span class="o">/</span><span class="no">experimental</span><span class="o">/</span><span class="no">fibers</span><span class="o">/</span><span class="no">fibers</span><span class="o">-</span><span class="no">test</span>
<span class="c">#7 at 0x42faf9 in std::_Function_handler&lt;int (), FiberManager_collectAll_Test::TestBody()::&#123;lambda()#1&#125;::operator()() const::&#123;lambda()#1&#125;::operator()() c</span> <span class="c">#7 at 0x42faf9 in std::_Function_handler&lt;int (), FiberManager_collectAll_Test::TestBody()::&#123;lambda()#1&#125;::operator()() const::&#123;lambda()#1&#125;::operator()() c</span>
<span class="nc" data-symbol-name="onst">onst</span><span class="o">::&#123;</span><span class="nf" data-symbol-name="lambda">lambda</span><span class="o">()</span><span class="c">#1&#125;&gt;::_M_invoke(std::_Any_data const&amp;) + 32 in section .text of /mnt/fio0/andrii/fbsource/fbcode/buck-out/gen/folly/experimental/fibers/fibers</span> <span class="nc" data-symbol-name="onst">onst</span><span class="o">::&#123;</span><span class="nf" data-symbol-name="lambda">lambda</span><span class="o">()</span><span class="c">#1&#125;&gt;::_M_invoke(std::_Any_data const&amp;) + 32 in section .text of /mnt/fio0/andrii/fbsource/fbcode/buck-out/gen/folly/fibers/fibers</span>
<span class="o">-</span><span class="no">test</span> <span class="o">-</span><span class="no">test</span>
<span class="c">#8 at 0x479d5c in std::function&lt;int ()&gt;::operator()() const + 50 in section .text of /mnt/fio0/andrii/fbsource/fbcode/buck-out/gen/folly/experimental/fib</span> <span class="c">#8 at 0x479d5c in std::function&lt;int ()&gt;::operator()() const + 50 in section .text of /mnt/fio0/andrii/fbsource/fbcode/buck-out/gen/folly/experimental/fib</span>
<span class="no">ers</span><span class="o">/</span><span class="no">fibers</span><span class="o">-</span><span class="no">test</span> <span class="no">ers</span><span class="o">/</span><span class="no">fibers</span><span class="o">-</span><span class="no">test</span>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <folly/Likely.h> #include <folly/Likely.h>
#include <folly/experimental/fibers/LoopController.h> #include <folly/fibers/LoopController.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <pthread.h> #include <pthread.h>
#include <folly/experimental/fibers/GenericBaton.h> #include <folly/fibers/GenericBaton.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <folly/Likely.h> #include <folly/Likely.h>
#include <folly/experimental/fibers/LoopController.h> #include <folly/fibers/LoopController.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
*/ */
#include <folly/Optional.h> #include <folly/Optional.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
#include <folly/experimental/fibers/ForEach.h> #include <folly/fibers/ForEach.h>
namespace folly { namespace folly {
namespace fibers { namespace fibers {
......
...@@ -136,4 +136,4 @@ typename std::enable_if< ...@@ -136,4 +136,4 @@ typename std::enable_if<
} }
} }
#include <folly/experimental/fibers/WhenN-inl.h> #include <folly/fibers/WhenN-inl.h>
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/futures/Future.h> #include <folly/futures/Future.h>
#include <folly/experimental/fibers/AddTasks.h> #include <folly/fibers/AddTasks.h>
#include <folly/experimental/fibers/EventBaseLoopController.h> #include <folly/fibers/EventBaseLoopController.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
#include <folly/experimental/fibers/FiberManagerMap.h> #include <folly/fibers/FiberManagerMap.h>
#include <folly/experimental/fibers/GenericBaton.h> #include <folly/fibers/GenericBaton.h>
#include <folly/experimental/fibers/SimpleLoopController.h> #include <folly/fibers/SimpleLoopController.h>
#include <folly/experimental/fibers/WhenN.h> #include <folly/fibers/WhenN.h>
using namespace folly::fibers; using namespace folly::fibers;
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/experimental/fibers/FiberManager.h> #include <folly/fibers/FiberManager.h>
#include <folly/experimental/fibers/SimpleLoopController.h> #include <folly/fibers/SimpleLoopController.h>
using namespace folly::fibers; using namespace folly::fibers;
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/experimental/fibers/FiberManagerMap.h>
#include <folly/experimental/symbolizer/SignalHandler.h> #include <folly/experimental/symbolizer/SignalHandler.h>
#include <folly/fibers/FiberManagerMap.h>
#include <folly/init/Init.h> #include <folly/init/Init.h>
void f(int* p) { void f(int* p) {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define FOLLY_FUTURE_USING_FIBER 0 #define FOLLY_FUTURE_USING_FIBER 0
#else #else
#define FOLLY_FUTURE_USING_FIBER 1 #define FOLLY_FUTURE_USING_FIBER 1
#include <folly/experimental/fibers/Baton.h> #include <folly/fibers/Baton.h>
#endif #endif
namespace folly { namespace folly {
......
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