| 528 | }; |
| 529 | |
| 530 | std::unique_ptr<ThrottledAsyncTaskScheduler> MakeThrottledAsyncTaskGroup( |
| 531 | AsyncTaskScheduler* target, int max_concurrent_cost, |
| 532 | std::unique_ptr<ThrottledAsyncTaskScheduler::Queue> maybe_queue, |
| 533 | FnOnce<Status()> finish_cb) { |
| 534 | std::shared_ptr<ThrottledAsyncTaskScheduler> throttle = |
| 535 | ThrottledAsyncTaskScheduler::Make(target, max_concurrent_cost, |
| 536 | std::move(maybe_queue)); |
| 537 | std::unique_ptr<AsyncTaskGroup> task_group = |
| 538 | AsyncTaskGroup::Make(throttle.get(), std::move(finish_cb)); |
| 539 | return std::make_unique<ThrottledAsyncTaskGroup>(std::move(throttle), |
| 540 | std::move(task_group)); |
| 541 | } |
| 542 | |
| 543 | } // namespace util |
| 544 | } // namespace arrow |
no test coverage detected