wuzhoupei opened a new issue, #45266: URL: https://github.com/apache/arrow/issues/45266
### Describe the bug, including details regarding any error messages, version, and platform. This is a probability case caused by multi-threads. TaskGroup will run a fixed number of tasks. But if any task got an error status, the count of finished tasks will be wrong. That will let the scheduler thinks some tasks still running. But actually, here is that all tasks have finished or be canceled and wait the scheduler calls the EndFunction. So that means the TaskGroup will be not finished forever. ### Component(s) C++ -- 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: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org