Commit 28f37dc5 authored by Marshall Cline's avatar Marshall Cline Committed by Facebook Github Bot

fix contract nits (non-functional; comment-only)

Summary: Fix a few nits in the contracts/specification

Reviewed By: yfeldblum

Differential Revision: D8962060

fbshipit-source-id: 8344403d3e26a01bef02deee3bb964fbaf6a1591
parent 148e1b8f
...@@ -580,8 +580,7 @@ class SemiFuture : private futures::detail::FutureBase<T> { ...@@ -580,8 +580,7 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// Blocks until the semifuture is fulfilled, or until `dur` elapses. Returns /// Blocks until the semifuture is fulfilled, or until `dur` elapses. Returns
/// the value (moved-out), or throws the exception (which might be a /// the value (moved-out), or throws the exception (which might be a
/// FutureTimeout). /// FutureTimeout exception).
/// exception).
/// ///
/// Preconditions: /// Preconditions:
/// ///
...@@ -819,9 +818,6 @@ class SemiFuture : private futures::detail::FutureBase<T> { ...@@ -819,9 +818,6 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// - `RESULT.valid() == true` /// - `RESULT.valid() == true`
SemiFuture<T> delayed(Duration dur, Timekeeper* tk = nullptr) &&; SemiFuture<T> delayed(Duration dur, Timekeeper* tk = nullptr) &&;
/// Return a future that completes inline, as if the future had no executor.
/// Intended for porting legacy code without behavioural change, and for rare
/// cases where this is really the intended behaviour.
/// Returns a future that completes inline, as if the future had no executor. /// Returns a future that completes inline, as if the future had no executor.
/// Intended for porting legacy code without behavioral change, and for rare /// Intended for porting legacy code without behavioral change, and for rare
/// cases where this is really the intended behavior. /// cases where this is really the intended behavior.
...@@ -1372,8 +1368,11 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1372,8 +1368,11 @@ class Future : private futures::detail::FutureBase<T> {
/// Set an error continuation for this Future. The continuation should take an /// Set an error continuation for this Future. The continuation should take an
/// argument of the type that you want to catch, and should return a value of /// argument of the type that you want to catch, and should return a value of
/// the same type as this Future, or a Future of that type (see overload /// the same type as this Future, or a Future of that type (see overload
/// below). For instance, /// below).
///
/// Example:
/// ///
/// ```
/// makeFuture() /// makeFuture()
/// .thenValue([] { /// .thenValue([] {
/// throw std::runtime_error("oh no!"); /// throw std::runtime_error("oh no!");
...@@ -1383,6 +1382,7 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1383,6 +1382,7 @@ 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:
/// ///
...@@ -1900,8 +1900,9 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1900,8 +1900,9 @@ 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;
......
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