bkietz commented on a change in pull request #8680:
URL: https://github.com/apache/arrow/pull/8680#discussion_r546002566
##########
File path: cpp/src/arrow/util/future.h
##########
@@ -273,11 +349,134 @@ class Future {
}
/// \brief Make a finished Future<> with the provided Status.
- template <typename E = ValueType, typename = detail::Empty::EnableIfSame<E>>
+ template <typename E = ValueType, typename = typename std::enable_if<
+ std::is_same<E,
detail::Empty>::value>::type>
static Future<> MakeFinished(Status s = Status::OK()) {
return MakeFinished(E::ToResult(std::move(s)));
}
+ /// \brief Consumer API: Register a callback to run when this future
completes
+ ///
+ /// The callback should receive the result of the future (const Result<T>&)
+ /// For a void or statusy future this should be
+ /// (const Result<Future<detail::Empty>::ValueType>& result)
Review comment:
I think it's preferable to keep things as generic as possible, so the
empty result is preferable to the plain Status
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]