westonpace commented on a change in pull request #10258:
URL: https://github.com/apache/arrow/pull/10258#discussion_r643630671
##########
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:
Hmm, `from_unfinished` is supposed to mean "was the callback added when
the future was unfinished" but I can see how that is vague. I could just
remove this option entirely. The `TryAddCallback` function already gives you
this capability (it is used in `Transfer`) and so it isn't used anywhere. Any
strong opinion?
--
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]