pitrou commented on code in PR #46711:
URL: https://github.com/apache/arrow/pull/46711#discussion_r2141759218
##########
cpp/src/arrow/util/async_util.cc:
##########
@@ -350,8 +346,9 @@ class ThrottledAsyncTaskSchedulerImpl
self = shared_from_this()]() mutable -> Result<Future<>> {
ARROW_ASSIGN_OR_RAISE(Future<> inner_fut, (*inner_task)());
if (!inner_fut.TryAddCallback([&] {
- return [latched_cost, self = std::move(self)](const Status&
st) -> void {
- if (st.ok()) {
+ return [latched_cost,
+ weak_self = self->weak_from_this()](const Status& st)
-> void {
Review Comment:
At that point, it seems the `AddSimpleTask` call will always be synchronous
(it calls the underlying non-throttled `AsyncTaskScheduler`). What do you think?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]