westonpace commented on a change in pull request #10205: URL: https://github.com/apache/arrow/pull/10205#discussion_r626238841
########## File path: cpp/src/arrow/util/thread_pool.h ########## @@ -227,14 +228,14 @@ class ARROW_EXPORT SerialExecutor : public Executor { std::shared_ptr<State> state_; template <typename T> - Result<T> Run(TopLevelTask<T> initial_task) { + Future<T> Run(TopLevelTask<T> initial_task) { auto final_fut = std::move(initial_task)(this); if (final_fut.is_finished()) { - return final_fut.result(); + return final_fut; } - final_fut.AddCallback([this](const Result<T>&) { MarkFinished(); }); + final_fut.AddCallback([this](...) { MarkFinished(); }); Review comment: What's the source for this rule. I had remembered some rule like this but I couldn't find it when I searched for it so I started to think I had made it up. For example, https://en.cppreference.com/w/cpp/language/parameter_pack doesn't have the word "trivial" anywhere. -- 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