pitrou commented on a change in pull request #10258:
URL: https://github.com/apache/arrow/pull/10258#discussion_r643963486
##########
File path: cpp/src/arrow/util/future.cc
##########
@@ -272,8 +315,8 @@ class ConcreteFutureImpl : public FutureImpl {
//
// In fact, it is important not to hold the locks because the callback
// may be slow or do its own locking on other resources
- for (auto&& callback : callbacks_) {
- std::move(callback)();
+ for (auto& callback_record : callbacks_) {
+ RunOrScheduleCallback(callback_record, /*from_unfinished=*/true);
Review comment:
I think `IfUnfinished` is ok, perhaps the `from_unfinished` variable
needs better naming or an explanatory comment though :-)
--
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]