| 515 | }; |
| 516 | |
| 517 | std::unique_ptr<ThrottledAsyncTaskScheduler> MakeThrottledAsyncTaskGroup( |
| 518 | AsyncTaskScheduler* target, int max_concurrent_cost, |
| 519 | std::unique_ptr<ThrottledAsyncTaskScheduler::Queue> maybe_queue, |
| 520 | FnOnce<Status()> finish_cb) { |
| 521 | std::shared_ptr<ThrottledAsyncTaskScheduler> throttle = |
| 522 | ThrottledAsyncTaskScheduler::Make(target, max_concurrent_cost, |
| 523 | std::move(maybe_queue)); |
| 524 | std::unique_ptr<AsyncTaskGroup> task_group = |
| 525 | AsyncTaskGroup::Make(throttle.get(), std::move(finish_cb)); |
| 526 | return std::make_unique<ThrottledAsyncTaskGroup>(std::move(throttle), |
| 527 | std::move(task_group)); |
| 528 | } |
| 529 | |
| 530 | } // namespace util |
| 531 | } // namespace arrow |
no test coverage detected