| 415 | |
| 416 | template <typename T, typename FTSync = typename Future<T>::SyncType> |
| 417 | Future<T> Run(TopLevelTask<T> initial_task) { |
| 418 | auto final_fut = std::move(initial_task)(this); |
| 419 | final_fut.AddCallback([this](const FTSync&) { Finish(); }); |
| 420 | RunLoop(); |
| 421 | return final_fut; |
| 422 | } |
| 423 | |
| 424 | #ifndef ARROW_ENABLE_THREADING |
| 425 | // we have to run tasks from all live executors |