Commit 25c2411f authored by Marshall Cline's avatar Marshall Cline Committed by Facebook Github Bot

Fix doc-comment indentation of code-blocks

Summary:
This is a non-functional comment-only change.

Reason: doc-comment tools interpret embedded code-blocks via 2-space-indentation instead of "```"

Reviewed By: LeeHowes

Differential Revision: D9414916

fbshipit-source-id: d7dd29b0d67f1a361a99fba5b95aa3a6e095041c
parent 07a29570
...@@ -773,7 +773,6 @@ class SemiFuture : private futures::detail::FutureBase<T> { ...@@ -773,7 +773,6 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// ///
/// Example: /// Example:
/// ///
/// ```
/// makeSemiFuture() /// makeSemiFuture()
/// .defer([] { /// .defer([] {
/// throw std::runtime_error("oh no!"); /// throw std::runtime_error("oh no!");
...@@ -783,7 +782,6 @@ class SemiFuture : private futures::detail::FutureBase<T> { ...@@ -783,7 +782,6 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// LOG(INFO) << e.what(); /// LOG(INFO) << e.what();
/// return -1; // or makeFuture<int>(-1) or makeSemiFuture<int>(-1) /// return -1; // or makeFuture<int>(-1) or makeSemiFuture<int>(-1)
/// }); /// });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1143,9 +1141,7 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1143,9 +1141,7 @@ class Future : private futures::detail::FutureBase<T> {
/// ///
/// A Future for the return type of func is returned. /// A Future for the return type of func is returned.
/// ///
/// ```
/// Future<string> f2 = f1.then([](Try<T>&&) { return string("foo"); }); /// Future<string> f2 = f1.then([](Try<T>&&) { return string("foo"); });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1242,12 +1238,10 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1242,12 +1238,10 @@ class Future : private futures::detail::FutureBase<T> {
/// ///
/// A Future for the return type of func is returned. /// A Future for the return type of func is returned.
/// ///
/// ```
/// Future<string> f2 = std::move(f1).thenTry([](auto&& t) { /// Future<string> f2 = std::move(f1).thenTry([](auto&& t) {
/// ... /// ...
/// return string("foo"); /// return string("foo");
/// }); /// });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1274,12 +1268,10 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1274,12 +1268,10 @@ class Future : private futures::detail::FutureBase<T> {
/// ///
/// A Future for the return type of func is returned. /// A Future for the return type of func is returned.
/// ///
/// ```
/// Future<string> f2 = f1.thenValue([](auto&& v) { /// Future<string> f2 = f1.thenValue([](auto&& v) {
/// ... /// ...
/// return string("foo"); /// return string("foo");
/// }); /// });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1304,7 +1296,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1304,7 +1296,6 @@ class Future : private futures::detail::FutureBase<T> {
/// ///
/// Example: /// Example:
/// ///
/// ```
/// makeFuture() /// makeFuture()
/// .thenTry([] { /// .thenTry([] {
/// throw std::runtime_error("oh no!"); /// throw std::runtime_error("oh no!");
...@@ -1314,7 +1305,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1314,7 +1305,6 @@ class Future : private futures::detail::FutureBase<T> {
/// LOG(INFO) << "std::runtime_error: " << e.what(); /// LOG(INFO) << "std::runtime_error: " << e.what();
/// return -1; // or makeFuture<int>(-1) or makeSemiFuture<int>(-1) /// return -1; // or makeFuture<int>(-1) or makeSemiFuture<int>(-1)
/// }); /// });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1338,7 +1328,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1338,7 +1328,6 @@ class Future : private futures::detail::FutureBase<T> {
/// ///
/// Example: /// Example:
/// ///
/// ```
/// makeFuture() /// makeFuture()
/// .thenTry([] { /// .thenTry([] {
/// throw std::runtime_error("oh no!"); /// throw std::runtime_error("oh no!");
...@@ -1348,7 +1337,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1348,7 +1337,6 @@ class Future : private futures::detail::FutureBase<T> {
/// LOG(INFO) << e.what(); /// LOG(INFO) << e.what();
/// return -1; // or makeFuture<int>(-1) or makeSemiFuture<int>(-1) /// return -1; // or makeFuture<int>(-1) or makeSemiFuture<int>(-1)
/// }); /// });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1408,7 +1396,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1408,7 +1396,6 @@ class Future : private futures::detail::FutureBase<T> {
/// ///
/// Example: /// Example:
/// ///
/// ```
/// makeFuture() /// makeFuture()
/// .thenValue([] { /// .thenValue([] {
/// throw std::runtime_error("oh no!"); /// throw std::runtime_error("oh no!");
...@@ -1418,7 +1405,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1418,7 +1405,6 @@ class Future : private futures::detail::FutureBase<T> {
/// LOG(INFO) << "std::runtime_error: " << e.what(); /// LOG(INFO) << "std::runtime_error: " << e.what();
/// return -1; // or makeFuture<int>(-1) /// return -1; // or makeFuture<int>(-1)
/// }); /// });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1509,21 +1495,17 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1509,21 +1495,17 @@ class Future : private futures::detail::FutureBase<T> {
/// Like onError, but for timeouts. example: /// Like onError, but for timeouts. example:
/// ///
/// ```
/// Future<int> f = makeFuture<int>(42) /// Future<int> f = makeFuture<int>(42)
/// .delayed(long_time) /// .delayed(long_time)
/// .onTimeout(short_time, /// .onTimeout(short_time,
/// [] { return -1; }); /// [] { return -1; });
/// ```
/// ///
/// or perhaps /// or perhaps
/// ///
/// ```
/// Future<int> f = makeFuture<int>(42) /// Future<int> f = makeFuture<int>(42)
/// .delayed(long_time) /// .delayed(long_time)
/// .onTimeout(short_time, /// .onTimeout(short_time,
/// [] { return makeFuture<int>(some_exception); }); /// [] { return makeFuture<int>(some_exception); });
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1772,16 +1754,12 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1772,16 +1754,12 @@ class Future : private futures::detail::FutureBase<T> {
/// Create a Future chain from a sequence of continuations. i.e. /// Create a Future chain from a sequence of continuations. i.e.
/// ///
/// ```
/// f.then(a).then(b).then(c) /// f.then(a).then(b).then(c)
/// ```
/// ///
/// where f is a Future<A> and the result of the chain is a Future<D> /// where f is a Future<A> and the result of the chain is a Future<D>
/// becomes /// becomes
/// ///
/// ```
/// f.thenMulti(a, b, c); /// f.thenMulti(a, b, c);
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1819,16 +1797,12 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1819,16 +1797,12 @@ class Future : private futures::detail::FutureBase<T> {
/// Create a Future chain from a sequence of callbacks. i.e. /// Create a Future chain from a sequence of callbacks. i.e.
/// ///
/// ```
/// f.via(executor).then(a).then(b).then(c).via(oldExecutor) /// f.via(executor).then(a).then(b).then(c).via(oldExecutor)
/// ```
/// ///
/// where f is a Future<A> and the result of the chain is a Future<D> /// where f is a Future<A> and the result of the chain is a Future<D>
/// becomes /// becomes
/// ///
/// ```
/// f.thenMultiWithExecutor(executor, a, b, c); /// f.thenMultiWithExecutor(executor, a, b, c);
/// ```
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -1944,9 +1918,7 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1944,9 +1918,7 @@ class Future : private futures::detail::FutureBase<T> {
/// unpleasantly surprised if we redefine Duration to microseconds, or /// unpleasantly surprised if we redefine Duration to microseconds, or
/// something. /// something.
/// ///
/// ```
/// timekeeper.after(std::chrono::duration_cast<Duration>(someNanoseconds)) /// timekeeper.after(std::chrono::duration_cast<Duration>(someNanoseconds))
/// ```
class Timekeeper { class Timekeeper {
public: public:
virtual ~Timekeeper() = default; virtual ~Timekeeper() = default;
......
...@@ -86,13 +86,11 @@ class CoreCallbackState; ...@@ -86,13 +86,11 @@ class CoreCallbackState;
/// ///
/// That usage pattern looks roughly like this: /// That usage pattern looks roughly like this:
/// ///
/// ```
/// auto [p, f] = makePromiseContract(executor); /// auto [p, f] = makePromiseContract(executor);
/// g = std::move(f).then([](MyValue&& x) { /// g = std::move(f).then([](MyValue&& x) {
/// ...executor runs this code if/when a MyValue is ready... /// ...executor runs this code if/when a MyValue is ready...
/// }); /// });
/// ...launch the async producer that eventually calls p.setResult()... /// ...launch the async producer that eventually calls p.setResult()...
/// ```
/// ///
/// This is just one of many potential usage patterns. It has the desired /// This is just one of many potential usage patterns. It has the desired
/// property of being nonblocking to the caller. Of course the `.then()` /// property of being nonblocking to the caller. Of course the `.then()`
...@@ -233,13 +231,11 @@ class Promise { ...@@ -233,13 +231,11 @@ class Promise {
/// ///
/// Sample usage: /// Sample usage:
/// ///
/// ```
/// Promise<MyValue> p = ... /// Promise<MyValue> p = ...
/// ... /// ...
/// auto const ep = std::exception_ptr(); /// auto const ep = std::exception_ptr();
/// auto const ew = exception_wrapper::from_exception_ptr(ep); /// auto const ew = exception_wrapper::from_exception_ptr(ep);
/// p.setException(ew); /// p.setException(ew);
/// ```
/// ///
/// Functionally equivalent to `setTry(Try<T>(std::move(ew)))` /// Functionally equivalent to `setTry(Try<T>(std::move(ew)))`
/// ///
...@@ -367,9 +363,7 @@ class Promise { ...@@ -367,9 +363,7 @@ class Promise {
/// ///
/// Example: /// Example:
/// ///
/// ```
/// p.setWith([] { do something that may throw; return a T; }); /// p.setWith([] { do something that may throw; return a T; });
/// ```
/// ///
/// Functionally equivalent to `setTry(makeTryWith(static_cast<F&&>(func)));` /// Functionally equivalent to `setTry(makeTryWith(static_cast<F&&>(func)));`
/// ///
......
...@@ -112,7 +112,6 @@ static_assert(sizeof(SpinLock) == 1, "missized"); ...@@ -112,7 +112,6 @@ static_assert(sizeof(SpinLock) == 1, "missized");
/// The FSM to manage the primary producer-to-consumer info-flow has these /// The FSM to manage the primary producer-to-consumer info-flow has these
/// allowed (atomic) transitions: /// allowed (atomic) transitions:
/// ///
/// ```
/// +-------------------------------------------------------------+ /// +-------------------------------------------------------------+
/// | ---> OnlyResult ----- | /// | ---> OnlyResult ----- |
/// | / \ | /// | / \ |
...@@ -124,7 +123,6 @@ static_assert(sizeof(SpinLock) == 1, "missized"); ...@@ -124,7 +123,6 @@ static_assert(sizeof(SpinLock) == 1, "missized");
/// | \ / | /// | \ / |
/// | ---> OnlyCallback --- | /// | ---> OnlyCallback --- |
/// +-------------------------------------------------------------+ /// +-------------------------------------------------------------+
/// ```
/// ///
/// States and the corresponding producer-to-consumer data status & ownership: /// States and the corresponding producer-to-consumer data status & ownership:
/// ///
......
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