pitrou commented on a change in pull request #9892:
URL: https://github.com/apache/arrow/pull/9892#discussion_r609662061



##########
File path: cpp/src/arrow/util/thread_pool.h
##########
@@ -233,15 +233,7 @@ class ARROW_EXPORT SerialExecutor : public Executor {
     if (final_fut.is_finished()) {
       return final_fut.result();
     }
-    final_fut = final_fut.Then(
-        [this](const T& res) {
-          MarkFinished();
-          return res;
-        },
-        [this](const Status& st) -> Result<T> {
-          MarkFinished();
-          return st;
-        });
+    final_fut.AddCallback([this](const Result<T>&) { MarkFinished(); });

Review comment:
       Yes, that's part of my changes (see comment about locking).




-- 
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]


Reply via email to