egolearner opened a new pull request, #49860: URL: https://github.com/apache/arrow/pull/49860
### Rationale for this change resolve #47642 If the `initial_task` passed to `AsyncTaskScheduler::Make` throws a C++ exception (rather than returning a failed `Status`), `OnTaskFinished` is never called. This leaves `running_tasks_` permanently at 1, causing a `DCHECK` failure in debug builds and an indefinite hang in release builds because the scheduler's `finished` future is never completed. In Acero, this manifests as `DeclarationToTable` (and similar APIs) hanging forever when a `SourceNode` generator throws during `StartProducing`. ### What changes are included in this PR? Add exception handling logic. ### Are these changes tested? Yes. ### Are there any user-facing changes? No API changes. -- 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]
