westonpace commented on a change in pull request #10205: URL: https://github.com/apache/arrow/pull/10205#discussion_r631578198
########## File path: cpp/src/arrow/util/future.h ########## @@ -56,6 +47,47 @@ struct is_future<Future<T>> : std::true_type {}; template <typename Signature> using result_of_t = typename std::result_of<Signature>::type; +template <typename Source, typename Dest> +typename std::enable_if<Source::is_empty>::type Propagate(Source* source, Dest dest) { + struct MarkNextFinished { + void operator()(const Status& status) && { next.MarkFinished(status); } + Dest next; + }; + source->AddCallback(MarkNextFinished{std::move(dest)}); +} + +template <typename Source, typename Dest, bool SourceEmpty = Source::is_empty, + bool DestEmpty = Dest::is_empty> +struct MarkNextFinished {}; + +template <typename Source, typename Dest> +struct MarkNextFinished<Source, Dest, true, false> { + void operator()(const Status& status) && { next.MarkFinished(status); } Review comment: Correct. I've removed this method. -- 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: us...@infra.apache.org